必要なものはすべてタイトルにあります。たとえば、そのようなことができる方法を知りたいです:
---
- hosts: ansible-clients
tasks:
- name: Fetch source list from clients
fetch: src=/etc/apt/sources.list
dest=/tmp/allnodes.sourcelist
または単純な方法で
echo remote@/etc/apt/sources.list >> local@/tmp/allnodes.sourcelist
ローカルでスクリプトを作成して実行することはできますが、すべてのアクションを 1 つの Playbook で実行することが唯一の条件です。