WIP: Initial VM provisioning #4

Closed
cyclane wants to merge 38 commits from initial-vm-provisioning into main
1 changed files with 10 additions and 9 deletions
Showing only changes of commit 870e4e9476 - Show all commits

View File

@ -3,11 +3,16 @@
gather_facts: false gather_facts: false
tasks: tasks:
- name: Wait for connection - name: Wait for connection
ansible.builtin.wait_for: ansible.builtin.ping:
host: "{{ inventory_hostname }}" register: wait_conn
port: 22 retries: 30
timeout: 300 delay: 10
delegate_to: localhost until: wait_conn.ping is defined
# ansible.builtin.wait_for:
# host: "{{ inventory_hostname }}"
# port: 22
# timeout: 300
# delegate_to: localhost
- name: Test some stuff - name: Test some stuff
ansible.builtin.shell: | ansible.builtin.shell: |
touch ~/hmm touch ~/hmm
@ -15,10 +20,6 @@
echo test2 >> ~/test echo test2 >> ~/test
mkdir ~/dir mkdir ~/dir
touch ~/dir/testing touch ~/dir/testing
register: stuff
retries: 10
delay: 6
until: stuff.rc == 0
- name: Install some stuff - name: Install some stuff
ansible.builtin.apt: ansible.builtin.apt:
update_cache: true update_cache: true