- prep for jenkins cloud move to openstack
- enhance the persistent_cloud tasks to use newer style conditionals
This commit is contained in:
parent
875320a6d1
commit
45c3314058
7 changed files with 40 additions and 13 deletions
|
@ -7,18 +7,18 @@
|
|||
- name: spin it up
|
||||
local_action: ec2 keypair=${keypair} image=${image} type=${instance_type} wait=true group=${security_group} ec2_access_key=$persist_access_key ec2_secret_key=$persist_secret_key ec2_url=$os_ec2_url
|
||||
register: inst_res
|
||||
only_if: "'${host_is_up.rc}' != '0'"
|
||||
when_failed: $host_is_up
|
||||
|
||||
- name: assign it a special ip
|
||||
local_action: shell euca-associate-address --config ${persist_config} -i ${inst_res.instances[0].id} ${public_ip}
|
||||
only_if: "'${host_is_up.rc}' != '0'"
|
||||
when_failed: $host_is_up
|
||||
|
||||
- name: wait for the reassignation
|
||||
local_action: wait_for host=${public_ip} port=22 delay=20 timeout=300
|
||||
only_if: "'${host_is_up.rc}' != '0'"
|
||||
when_failed: $host_is_up
|
||||
|
||||
# attach and mount volumes
|
||||
- name: attach volumes to the system
|
||||
local_action: shell euca-attach-volume --config ${persist_config} -i ${inst_res.instances[0].id} $item
|
||||
only_if: "'${host_is_up.rc}' != '0' and len('$item') != 0"
|
||||
with_items: $volumes
|
||||
only_if: is_set('$volumes') and int('$host_is_up.rc') != '0'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue