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:

  1. send deployment request instance
  2. get kind of instance or request id said request
  3. poll result of request
  4. 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

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -