From 870e4e94765e12be80394fcc57eee58f16b03ece Mon Sep 17 00:00:00 2001 From: Gleb Koval Date: Sun, 10 Sep 2023 23:57:43 +0100 Subject: [PATCH] improve 0001 --- infra/joplin/0001_software_playbook.yaml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/infra/joplin/0001_software_playbook.yaml b/infra/joplin/0001_software_playbook.yaml index 654448d..6d940c3 100644 --- a/infra/joplin/0001_software_playbook.yaml +++ b/infra/joplin/0001_software_playbook.yaml @@ -3,11 +3,16 @@ gather_facts: false tasks: - name: Wait for connection - ansible.builtin.wait_for: - host: "{{ inventory_hostname }}" - port: 22 - timeout: 300 - delegate_to: localhost + ansible.builtin.ping: + register: wait_conn + retries: 30 + delay: 10 + until: wait_conn.ping is defined + # ansible.builtin.wait_for: + # host: "{{ inventory_hostname }}" + # port: 22 + # timeout: 300 + # delegate_to: localhost - name: Test some stuff ansible.builtin.shell: | touch ~/hmm @@ -15,10 +20,6 @@ echo test2 >> ~/test mkdir ~/dir touch ~/dir/testing - register: stuff - retries: 10 - delay: 6 - until: stuff.rc == 0 - name: Install some stuff ansible.builtin.apt: update_cache: true