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控制器任务是云