Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道是否可以列出清单中存在的所有节点以将它们写入文件?
例子:
我需要这样做,因为我使用反向代理,它会在我的 vhost 文件中自动输入我的新节点。
尝试这个:
- name: write hosts copy: dest: <your-name>.txt content: {{ groups.ungrouped | union(groups.<some-groups-you-have>) | join("\n") }}