summaryrefslogtreecommitdiffstats
path: root/playbooks/openstack/openshift-cluster/launch.yml
diff options
context:
space:
mode:
authorDiego Castro <spinolacastro@gmail.com>2015-08-27 13:41:16 -0300
committerDiego Castro <spinolacastro@gmail.com>2015-08-27 13:41:16 -0300
commitd54665d0c0c1f7a3cec572c04f3ce769277c05e4 (patch)
tree043628b7a804ad66019129129cc0186289d80a28 /playbooks/openstack/openshift-cluster/launch.yml
parent055921cd545c12733949f37c1af2c0a1296216ec (diff)
parent5c7e1366ad8ae67ef23117d296a65a6ee81ccd29 (diff)
downloadopenshift-d54665d0c0c1f7a3cec572c04f3ce769277c05e4.tar.gz
openshift-d54665d0c0c1f7a3cec572c04f3ce769277c05e4.tar.bz2
openshift-d54665d0c0c1f7a3cec572c04f3ce769277c05e4.tar.xz
openshift-d54665d0c0c1f7a3cec572c04f3ce769277c05e4.zip
Merge remote-tracking branch 'openshift/master'
Diffstat (limited to 'playbooks/openstack/openshift-cluster/launch.yml')
-rw-r--r--playbooks/openstack/openshift-cluster/launch.yml33
1 files changed, 11 insertions, 22 deletions
diff --git a/playbooks/openstack/openshift-cluster/launch.yml b/playbooks/openstack/openshift-cluster/launch.yml
index d36bdbf26..651aef40b 100644
--- a/playbooks/openstack/openshift-cluster/launch.yml
+++ b/playbooks/openstack/openshift-cluster/launch.yml
@@ -19,30 +19,21 @@
changed_when: false
failed_when: stack_show_result.rc != 0 and 'Stack not found' not in stack_show_result.stderr
- - name: Create OpenStack Stack
- command: 'heat stack-create -f {{ openstack_infra_heat_stack }}
- -P cluster_id={{ cluster_id }}
- -P dns_nameservers={{ openstack_network_dns | join(",") }}
- -P cidr={{ openstack_network_cidr }}
- -P ssh_incoming={{ openstack_ssh_access_from }}
- -P num_masters={{ num_masters }}
- -P num_nodes={{ num_nodes }}
- -P num_infra={{ num_infra }}
- -P master_image={{ deployment_vars[deployment_type].image }}
- -P node_image={{ deployment_vars[deployment_type].image }}
- -P infra_image={{ deployment_vars[deployment_type].image }}
- -P master_flavor={{ openstack_flavor["master"] }}
- -P node_flavor={{ openstack_flavor["node"] }}
- -P infra_flavor={{ openstack_flavor["infra"] }}
- -P ssh_public_key="{{ openstack_ssh_public_key }}"
- openshift-ansible-{{ cluster_id }}-stack'
+ - set_fact:
+ heat_stack_action: 'stack-create'
when: stack_show_result.rc == 1
+ - set_fact:
+ heat_stack_action: 'stack-update'
+ when: stack_show_result.rc == 0
- - name: Update OpenStack Stack
- command: 'heat stack-update -f {{ openstack_infra_heat_stack }}
+ - name: Create or Update OpenStack Stack
+ command: 'heat {{ heat_stack_action }} -f {{ openstack_infra_heat_stack }}
-P cluster_id={{ cluster_id }}
- -P dns_nameservers={{ openstack_network_dns | join(",") }}
-P cidr={{ openstack_network_cidr }}
+ -P dns_nameservers={{ openstack_network_dns | join(",") }}
+ -P external_net={{ openstack_network_external_net }}
+ -P floating_ip_pool={{ openstack_floating_ip_pool }}
+ -P ssh_public_key="{{ openstack_ssh_public_key }}"
-P ssh_incoming={{ openstack_ssh_access_from }}
-P num_masters={{ num_masters }}
-P num_nodes={{ num_nodes }}
@@ -53,9 +44,7 @@
-P master_flavor={{ openstack_flavor["master"] }}
-P node_flavor={{ openstack_flavor["node"] }}
-P infra_flavor={{ openstack_flavor["infra"] }}
- -P ssh_public_key="{{ openstack_ssh_public_key }}"
openshift-ansible-{{ cluster_id }}-stack'
- when: stack_show_result.rc == 0
- name: Wait for OpenStack Stack readiness
shell: 'heat stack-show openshift-ansible-{{ cluster_id }}-stack | awk ''$2 == "stack_status" {print $4}'''