use cloudinit-wait role from git
This commit is contained in:
parent
723bc7ed33
commit
b8adaee9d4
2 changed files with 8 additions and 22 deletions
|
@ -1,28 +1,11 @@
|
|||
- name: Setup homeserver
|
||||
- name: Wait for servers to come up
|
||||
hosts: max
|
||||
gather_facts: no
|
||||
roles:
|
||||
- 'cloudinit-wait'
|
||||
|
||||
pre_tasks:
|
||||
- name: Wait for host to come up
|
||||
tags: always
|
||||
block:
|
||||
- name: Wait for SSH connection
|
||||
wait_for:
|
||||
state: started
|
||||
port: 22
|
||||
host: max.dmz
|
||||
timeout: 300
|
||||
connect_timeout: 300
|
||||
search_regex: OpenSSH
|
||||
delegate_to: localhost
|
||||
- name: Wait for cloud-init to finish
|
||||
shell:
|
||||
cmd: "cloud-init status --wait"
|
||||
register: cloudinit
|
||||
changed_when: "'..' in cloudinit.stdout"
|
||||
- name: Gather facts
|
||||
setup:
|
||||
|
||||
- name: Start services
|
||||
hosts: max
|
||||
roles:
|
||||
- {role: 'watchtower', tags: 'watchtower'}
|
||||
- {role: 'forgejo', tags: 'forgejo'}
|
||||
|
|
3
ansible/requirements.yml
Normal file
3
ansible/requirements.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
- name: cloudinit-wait
|
||||
src: https://git.pim.kunis.nl/pim/ansible-role-cloudinit-wait
|
||||
scm: git
|
Reference in a new issue