# service: ... state=started always shows "changed"

**URL:** <https://forum.ansible.com/t/service-state-started-always-shows-changed/13354>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [August 23, 2013, 2:15pm UTC](https://forum.ansible.com/t/service-state-started-always-shows-changed/13354 "2013-08-23T14:15:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Randy\_Syring](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@Randy\_Syring](https://forum.ansible.com/u/Randy_Syring)\
**Post date:** [August 23, 2013, 2:15pm UTC](https://forum.ansible.com/t/service-state-started-always-shows-changed/13354/1 "2013-08-23T14:15:20Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![James\_Cammarata1](https://avatars.discourse-cdn.com/v4/letter/j/d26b3c/32.png) [@James\_Cammarata1](https://forum.ansible.com/u/James_Cammarata1)\
**Post date:** [August 23, 2013, 3:33pm UTC](https://forum.ansible.com/t/service-state-started-always-shows-changed/13354/2 "2013-08-23T15:33:59Z")

</div>

If you run “service ntpd status”, what is the exit code?
