我有以下剧本
- hosts: all
gather_facts: False
tasks:
- name: Check status of applications
shell: somecommand
register: result
changed_when: False
always_run: yes
Run Code Online (Sandbox Code Playgroud)
完成此任务后,我想运行一个邮件任务,该邮件任务将邮寄已在变量结果中注册的上述任务的所有命令的累计输出.截至目前,当我尝试这样做时,我会收到每个主机的邮件.有没有办法在多个主机上累积输出并将其注册到变量?
ansible ×1