Reputation: 71
After executing a shell command to change the node IP address of the node which I am connected to, connection gets lost (obviously). So control gets stuck at that particular task. How do I get past that task
---
- hosts: localhost
gather_facts: no
tasks:
- name: ESX IP change
shell: esxcli network ip interface ipv4 set -i vmk0 -I "{{item.esxNew}}" -N "{{esxNetmask}}" -t static &
delegate_to: "{{item.esxOld}}"
async: 10
poll: 5
with_items:
"{{nodeDetails}}"
Current results -
TASK [ESX IP change] ***************************************************************************************************************************************************
Expected results -
TASK [ESX IP change] ***************************************************************************************************************************************************
changed: [...]
Upvotes: 2
Views: 4035
Reputation: 2823
You can use timeout per tasks basis Like below:-
vars:
ansible_command_timeout: 40
Upvotes: 2