# Srop nginx playbook

**URL:** <https://forum.ansible.com/t/srop-nginx-playbook/35117>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [May 5, 2021, 1:31pm UTC](https://forum.ansible.com/t/srop-nginx-playbook/35117 "2021-05-05T13:31:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bec12317](https://avatars.discourse-cdn.com/v4/letter/b/a88e57/32.png) [@bec12317](https://forum.ansible.com/u/bec12317)\
**Post date:** [May 5, 2021, 1:31pm UTC](https://forum.ansible.com/t/srop-nginx-playbook/35117/1 "2021-05-05T13:31:19Z")

</div>

I am writing a playbook to stop nginx on a remote host (ubuntu). Please I appreciate your help as usual. Thank you

I get this timeout error:

TASK [nginx.service] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [my\_vm\_01]: FAILED! =\> {“changed”: false, “msg”: “Unable to stop service nginx.service: Failed to stop nginx.service: Connection timed out\nSee system logs and ‘systemctl status nginx.service’ for details.\n”}

Remote host syslog information:

May 5 16:23:37 cyber01-virtual-machine systemd[1]: Started Session 26 of user cyber01.  
May 5 16:23:39 cyber01-virtual-machine python3[6573]: ansible-setup Invoked with gather\_subset=[‘!all’] filter=ansible\_service\_mgr gather\_timeout=10 fact\_path=/etc/ansible/facts.d  
May 5 16:23:40 cyber01-virtual-machine python3[6590]: ansible-systemd Invoked with name=nginx.service state=stopped daemon\_reload=False daemon\_reexec=False no\_block=False enabled=None force=None masked=None user=None scope=None

Playbook:

---

<div class="post-metadata">

**Author:** ![The\_Vandyy\_Vines](https://avatars.discourse-cdn.com/v4/letter/t/7993a0/32.png) [@The\_Vandyy\_Vines](https://forum.ansible.com/u/The_Vandyy_Vines)\
**Post date:** [May 5, 2021, 1:34pm UTC](https://forum.ansible.com/t/srop-nginx-playbook/35117/2 "2021-05-05T13:34:02Z")

</div>

Hello,

Can you stop the nginx manually… On remote server and see if that is yhe problem and not ansible…

---

<div class="post-metadata">

**Author:** ![bec12317](https://avatars.discourse-cdn.com/v4/letter/b/a88e57/32.png) [@bec12317](https://forum.ansible.com/u/bec12317)\
**Post date:** [May 5, 2021, 1:48pm UTC](https://forum.ansible.com/t/srop-nginx-playbook/35117/3 "2021-05-05T13:48:41Z")

</div>

You are right. I cannot stop it manually. I am trying to solve that. Thank you

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [May 5, 2021, 2:40pm UTC](https://forum.ansible.com/t/srop-nginx-playbook/35117/4 "2021-05-05T14:40:42Z")

</div>

> Hello,
> 
> Can you stop the nginx manually... On remote server and see if that is yhe problem and not ansible..

Yes, that's good idea. In some cases I got a similar error message, but the service was actually stopped.  
Don't know if Ansible uses a different timeout than systemd itself.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

> ,
> 
> &nbsp;&nbsp;&nbsp;&nbsp;I am writing a playbook to stop nginx on a remote host (ubuntu). Please I appreciate your help as usual. Thank you
> 
> &nbsp;&nbsp;&nbsp;&nbsp;I get this timeout error:
> 
> &nbsp;&nbsp;&nbsp;&nbsp;TASK [nginx.service] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> &nbsp;&nbsp;&nbsp;&nbsp;fatal: [my\_vm\_01]: FAILED! =\> {"changed": false, "msg": "Unable to stop service nginx.service: Failed to stop  
> &nbsp;&nbsp;&nbsp;&nbsp;nginx.service: Connection timed out\nSee system logs and 'systemctl

status nginx.service' for details.\n"}

---

<div class="post-metadata">

**Author:** ![The\_Vandyy\_Vines](https://avatars.discourse-cdn.com/v4/letter/t/7993a0/32.png) [@The\_Vandyy\_Vines](https://forum.ansible.com/u/The_Vandyy_Vines)\
**Post date:** [May 5, 2021, 3:49pm UTC](https://forum.ansible.com/t/srop-nginx-playbook/35117/5 "2021-05-05T15:49:56Z")

</div>

Welcome… 😁
