Skip to content

Instantly share code, notes, and snippets.

@halberom
Created January 8, 2014 10:47
Show Gist options
  • Save halberom/8314950 to your computer and use it in GitHub Desktop.
Save halberom/8314950 to your computer and use it in GitHub Desktop.
---
- name: install ntp
yum: pkg=ntp state=installed
---
- include: "{{ action_ntp }}.yml"
---
- hosts: someserver
roles:
- { role: ntp, action_ntp: "install" }
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
---
- 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