|
[root@ansible ansible]# pwd
/etc/ansible
[root@ansible ansible]# cat site.yml
- name: install compute nodes roles
hosts: compute
vars:
roles:
- { role: commen,tags: commen }
- { role: nova, tags: nova }
- { role: neutron, tags: neutron }
- { role: cinder, tags: cinder }
- { role: test, tags: test }
[root@ansible ansible]# cd roles/test/
[root@ansible test]# pwd
/etc/ansible/roles/test
[root@ansible test]# ls
defaults files tasks templates vars
[root@ansible test]#
[root@ansible test]# cd tasks/
[root@ansible tasks]# cat main.yml
---
- name: update time
shell: date -R
# register: test
- name: print test
debug: msg="{{ test }}" |
|
|