- hosts: dr
become: true
become_user: root
tasks:
- name: yum
shell: "hostname >> /tmp/ycu.txt; yum history | head -5 >> /tmp/ycu.txt"
- name: Specifying a path directly
fetch:
src: /tmp/ycu.txt
dest: /tmp/{{ inventory_hostname }}/
flat: yes
Run Code Online (Sandbox Code Playgroud)
如何在此 ansible 脚本中的主机之间添加 30 秒的时间延迟?