I have a couple Ubuntu 12.04 LTS machines. Both have been configured through ansible with the following:
-
name: install ntp
apt: pkg=ntp state=latest
tags: ntp -
name: configure ntp file
template: src=ntp.conf.j2 dest=/etc/ntp.conf
tags: ntp
notify: restart ntp -
name: start the ntp service
service: name=ntp state=started enabled=true
tags: ntp
However, when I run ansible, it always shows starting the ntp service as “changed”:
(ansible)rsyring@antec:~/dev/3in1-internal/ansible-src$ ansible-playbook -i hosts officevms.yaml
sudo password:
PLAY [apply common configuration to all nodes] ********************************
GATHERING FACTS ***************************************************************
ok: [lmachen]
ok: [lbeza]
TASK: [install ntp] ***********************************************************
ok: [lmachen]
ok: [lbeza]
TASK: [configure ntp file] ****************************************************
ok: [lbeza]
ok: [lmachen]
TASK: [start the ntp service] *************************************************
changed: [lbeza]
changed: [lmachen]
PLAY RECAP ********************************************************************
lbeza : ok=4 changed=1 unreachable=0 failed=0
lmachen : ok=4 changed=1 unreachable=0 failed=0
However, I have verified the NTP service is running before I run ansible:
rsyring@lmachen:~$ service ntp status
- NTP server is running
rsyring@lmachen:~$
Ideas?