Increase timeout of SSH command in Ansible -
i using ansible provision bare metal using ipv6 link local address. once servers provisioned, ansible run series of tests on server, 1 shell command, ensure provisioning successful. these tests take approximately 10 minutes run.
the issue i'm facing connection seems timeout before command completes.
here error ansible:
fatal: [fe80::5054:ff:xxxx:xxxx%eth0]: unreachable! => { "changed": false, "msg": "failed connect host via ssh: shared connection fe80::5054:ff:xxxx:xxxx%eth0 closed.\r\n", "unreachable": true } how can increase timeout ansible wait command finish? can timeout increased within ansible configuration, or need modify command increase timeout?
you're going want run task asynchronously. high-level steps be:
- send deployment request instance
- get kind of instance or request id said request
- poll result of request
- continue playbook
here's example of behaviour official docs
- name: 'yum - fire , forget task' yum: name: docker-io state: installed async: 1000 poll: 0 register: yum_sleeper - name: 'yum - check on fire , forget task' async_status: jid: "{{ yum_sleeper.ansible_job_id }}" register: job_result until: job_result.finished retries: 30
Comments
Post a Comment