Sent from my iPhone On 31/05/2023, at 10:20 AM, Narmada Karthika <chittur...@gmail.com> wrote:
yea, I tried that option just to check if its timing out before it is disabling btw, I got it fixed I changed the user: root at the top level instead of play level
Aha, you can also opt to become root in task level, with sudo as well.
On Tuesday, May 30, 2023 at 3:13:40 PM UTC-7 "Kosala Atapattu (කෝසල අතපත්තු)" wrote:
Just wonder whether you can disable that service manually in 5 mins? Sent from my iPhone I am trying to run my playbook to check/restart/stop kestrel service on given node. I am able to ping that node using ansible but when running the task its is failing with connection timeout error.
here is the playbook --- - name: check kestrel service hosts: lin_dev become: true gather_facts: no vars: kestrelservicename: kestrel-api.service tasks: - name: check status of kestrel service ansible.builtin.service: name: "{{ kestrelservicename }}" state: started enabled: no become_user: root timeout: 300
error is
"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "Unable to disable service kestrel-api.service: Failed to execute operation: Connection timed out\n"}
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/cb497d46-3084-42ec-ba57-bc8fbb58a614n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/EC80B43B-7E2A-4C6C-BC10-1F10630C5128%40gmail.com.
|