Created
January 8, 2014 10:47
-
-
Save halberom/8314950 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: install ntp | |
yum: pkg=ntp state=installed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- include: "{{ action_ntp }}.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: someserver | |
roles: | |
- { role: ntp, action_ntp: "install" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
somehost# ansible-playbook ntp.yml -i hosts-test | |
PLAY [somehost] ***************************************************** | |
GATHERING FACTS *************************************************************** | |
ok: [somehost] | |
TASK: [install ntp] *********************************************************** | |
ok: [somehost] | |
PLAY RECAP ******************************************************************** | |
somehost : ok=2 changed=0 unreachable=0 failed=0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: start ntp | |
service: name=ntpd state=started |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment