parent
f8bd422451
commit
b89713643d
2 changed files with 18 additions and 16 deletions
1
main.tf
1
main.tf
|
@ -20,7 +20,6 @@ module "tf-datatest" {
|
|||
name = "max"
|
||||
domain_name = "tf-max"
|
||||
data_disk = "/kvm/data/max-data"
|
||||
#ansible_command = "ansible-playbook max.yml"
|
||||
memory = 1024 * 8
|
||||
mac = "CA:FE:C0:FF:EE:03"
|
||||
}
|
||||
|
|
33
max.yml
33
max.yml
|
@ -4,21 +4,24 @@
|
|||
|
||||
pre_tasks:
|
||||
- name: Wait for host to come up
|
||||
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:
|
||||
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:
|
||||
|
||||
roles:
|
||||
- {role: 'watchtower', tags: 'watchtower'}
|
||||
|
|
Reference in a new issue