0
運行後,下面的Ansible YAML文件中的輸出顯示文件被創建和內容發生變化Ansible文件創建沒有任何錯誤失敗
的YAML文件
---
- hosts: all
gather_facts: yes
connection: local
tasks:
- name: Check the date on the server.
action: command touch /opt/b
- name: cat the Content
action: command cat /opt/b
運行劇本
[email protected]:/var/lib/awx/projects/test# ansible-playbook main.yml
PLAY [all] *********************************************************************
TASK [setup] *******************************************************************
ok: [ansible-ubuntu-1604-db]
TASK [Check the date on the server.] *******************************************
changed: [ansible-ubuntu-1604-db]
[WARNING]: Consider using file module with state=touch rather than running touch
TASK [cat the Content] *********************************************************
changed: [ansible-ubuntu-1604-db]
PLAY RECAP *********************************************************************
ansible-ubuntu-1604-db : ok=3 changed=2 unreachable=0 failed=0
消息顯示c上吊= 2和犯規創建的MAC本地桌面
[email protected]:~$ ls -l /opt/
total 0
所述Env
- Ansible控制器任務是雲