Srop nginx playbook

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:

Hello,

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

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

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
        Racke

,

    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"}

Welcome… :grin: