diff options
Diffstat (limited to 'playbooks/openstack')
-rw-r--r-- | playbooks/openstack/openshift-cluster/cluster_hosts.yml | 27 | ||||
-rw-r--r-- | playbooks/openstack/openshift-cluster/launch.yml | 3 | ||||
-rw-r--r-- | playbooks/openstack/openshift-cluster/terminate.yml | 2 |
3 files changed, 14 insertions, 18 deletions
diff --git a/playbooks/openstack/openshift-cluster/cluster_hosts.yml b/playbooks/openstack/openshift-cluster/cluster_hosts.yml index bc586d983..1023f3ec1 100644 --- a/playbooks/openstack/openshift-cluster/cluster_hosts.yml +++ b/playbooks/openstack/openshift-cluster/cluster_hosts.yml @@ -1,22 +1,17 @@ --- -g_etcd_hosts: "{{ (groups['tag_host-type_etcd']|default([])) - | intersect((groups['tag_clusterid_' ~ cluster_id]|default([]))) - | intersect((groups['tag_environment_' ~ cluster_env]|default([]))) }}" +g_all_hosts: "{{ groups['tag_clusterid_' ~ cluster_id] | default([]) + | intersect(groups['tag_environment_' ~ cluster_env] | default([])) }}" -g_lb_hosts: "{{ (groups['tag_host-type_lb']|default([])) - | intersect((groups['tag_clusterid_' ~ cluster_id]|default([]))) - | intersect((groups['tag_environment_' ~ cluster_env]|default([]))) }}" +g_etcd_hosts: "{{ g_all_hosts | intersect(groups['tag_host-type_etcd'] | default([])) }}" -g_master_hosts: "{{ (groups['tag_host-type_master']|default([])) - | intersect((groups['tag_clusterid_' ~ cluster_id]|default([]))) - | intersect((groups['tag_environment_' ~ cluster_env]|default([]))) }}" +g_lb_hosts: "{{ g_all_hosts | intersect(groups['tag_host-type_lb'] | default([])) }}" -g_node_hosts: "{{ (groups['tag_host-type_node']|default([])) - | intersect((groups['tag_clusterid_' ~ cluster_id]|default([]))) - | intersect((groups['tag_environment_' ~ cluster_env]|default([]))) }}" +g_nfs_hosts: "{{ g_all_hosts | intersect(groups['tag_host-type_nfs'] | default([])) }}" -g_nfs_hosts: "{{ (groups['tag_host-type_nfs']|default([])) - | intersect((groups['tag_environment_' ~ cluster_id]|default([]))) }}" +g_master_hosts: "{{ g_all_hosts | intersect(groups['tag_host-type_master'] | default([])) }}" -g_all_hosts: "{{ g_master_hosts | union(g_node_hosts) | union(g_etcd_hosts) - | union(g_lb_hosts) | default([]) }}" +g_node_hosts: "{{ g_all_hosts | intersect(groups['tag_host-type_node'] | default([])) }}" + +g_infra_hosts: "{{ g_node_hosts | intersect(groups['tag_sub-host-type_infra']) | default([]) }}" + +g_compute_hosts: "{{ g_node_hosts | intersect(groups['tag_sub-host-type_compute']) | default([]) }}" diff --git a/playbooks/openstack/openshift-cluster/launch.yml b/playbooks/openstack/openshift-cluster/launch.yml index fdcb77acc..76cc64a73 100644 --- a/playbooks/openstack/openshift-cluster/launch.yml +++ b/playbooks/openstack/openshift-cluster/launch.yml @@ -29,6 +29,7 @@ - name: Create or Update OpenStack Stack command: 'heat {{ heat_stack_action }} -f {{ openstack_infra_heat_stack }} + --timeout 3 --enable-rollback -P cluster_env={{ cluster_env }} -P cluster_id={{ cluster_id }} -P cidr={{ openstack_network_cidr }} @@ -56,7 +57,7 @@ register: stack_show_status_result until: stack_show_status_result.stdout not in ['CREATE_IN_PROGRESS', 'UPDATE_IN_PROGRESS'] retries: 30 - delay: 1 + delay: 5 failed_when: stack_show_status_result.stdout not in ['CREATE_COMPLETE', 'UPDATE_COMPLETE'] - name: Read OpenStack Stack outputs diff --git a/playbooks/openstack/openshift-cluster/terminate.yml b/playbooks/openstack/openshift-cluster/terminate.yml index d4ab51fa7..7a86b78c5 100644 --- a/playbooks/openstack/openshift-cluster/terminate.yml +++ b/playbooks/openstack/openshift-cluster/terminate.yml @@ -43,6 +43,6 @@ register: stack_show_result until: stack_show_result.stdout != 'DELETE_IN_PROGRESS' retries: 60 - delay: 1 + delay: 5 failed_when: '"Stack not found" not in stack_show_result.stderr and stack_show_result.stdout != "DELETE_COMPLETE"' |