# service state=restarted: Documentation wrong? Or behaviour wrong?

**URL:** <https://forum.ansible.com/t/service-state-restarted-documentation-wrong-or-behaviour-wrong/11937>\
**Category:** Ansible Project\
**Created:** [September 27, 2012, 9:43pm UTC](https://forum.ansible.com/t/service-state-restarted-documentation-wrong-or-behaviour-wrong/11937 "2012-09-27T21:43:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Time\_Less](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@Time\_Less](https://forum.ansible.com/u/Time_Less)\
**Post date:** [September 27, 2012, 9:43pm UTC](https://forum.ansible.com/t/service-state-restarted-documentation-wrong-or-behaviour-wrong/11937/1 "2012-09-27T21:43:28Z")

</div>

“Service” documentation indicates “restarted” is not idempotent:

> ‘started’, ‘stopped’, ‘reloaded’, or ‘restarted’. Started/stopped are idempotent actions that will not run commands unless neccessary. **‘restarted’ will always bounce the service** , ‘reloaded’ will always reload.

Playbook:

> action: service name=hadoop-hdfs-namenode state=restarted

Actual behaviour:

> failed: [10.20.30.40] =\> {“changed”: false, “failed”: true, “msg”: “failed determining the current service state =\> state stays unchanged”}

Aside: this is during installation/configuration of HBase, which seems to have broken “service” scripts and will possibly never return proper state. Would like to be able to install HBase anyway.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [September 27, 2012, 10:05pm UTC](https://forum.ansible.com/t/service-state-restarted-documentation-wrong-or-behaviour-wrong/11937/2 "2012-09-27T22:05:21Z")

</div>

sounds like you were using upstart and need to update

[https://github.com/ansible/ansible/issues/1067](https://github.com/ansible/ansible/issues/1067)

---

<div class="post-metadata">

**Author:** ![Time\_Less](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@Time\_Less](https://forum.ansible.com/u/Time_Less)\
**Post date:** [September 29, 2012, 8:57pm UTC](https://forum.ansible.com/t/service-state-restarted-documentation-wrong-or-behaviour-wrong/11937/3 "2012-09-29T20:57:55Z")

</div>

Thanks for the URL. I’ve read it with great fascination and I think you’re right. I’m on the latest Ansible now (but I also think I worked around the problem using a pattern=).
