summaryrefslogtreecommitdiffstats
path: root/playbooks/openstack/openshift-cluster
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-11-30 17:33:03 -0500
committerKenny Woodson <kwoodson@redhat.com>2015-12-11 12:30:39 -0500
commit7c945d07d2a61e7334a10388d37ac28f1bc58ce1 (patch)
treed6a1c77f875ed11634aef0f79f476c2a5c7fa37c /playbooks/openstack/openshift-cluster
parent5ad87a4592167142ec23058385b9bb96b594a12b (diff)
downloadopenshift-7c945d07d2a61e7334a10388d37ac28f1bc58ce1.tar.gz
openshift-7c945d07d2a61e7334a10388d37ac28f1bc58ce1.tar.bz2
openshift-7c945d07d2a61e7334a10388d37ac28f1bc58ce1.tar.xz
openshift-7c945d07d2a61e7334a10388d37ac28f1bc58ce1.zip
Updating env-host-type to host patterns
Diffstat (limited to 'playbooks/openstack/openshift-cluster')
-rw-r--r--playbooks/openstack/openshift-cluster/config.yml8
-rw-r--r--playbooks/openstack/openshift-cluster/files/heat_stack_server.yaml6
-rw-r--r--playbooks/openstack/openshift-cluster/launch.yml8
-rw-r--r--playbooks/openstack/openshift-cluster/update.yml10
4 files changed, 15 insertions, 17 deletions
diff --git a/playbooks/openstack/openshift-cluster/config.yml b/playbooks/openstack/openshift-cluster/config.yml
index 888804e28..397ddadf5 100644
--- a/playbooks/openstack/openshift-cluster/config.yml
+++ b/playbooks/openstack/openshift-cluster/config.yml
@@ -9,10 +9,10 @@
- include: ../../common/openshift-cluster/config.yml
vars:
- g_etcd_group: "{{ 'tag_env-host-type_' ~ cluster_id ~ '-openshift-etcd' }}"
- g_lb_group: "{{ 'tag_env-host-type_' ~ cluster_id ~ '-openshift-lb' }}"
- g_masters_group: "{{ 'tag_env-host-type_' ~ cluster_id ~ '-openshift-master' }}"
- g_nodes_group: "{{ 'tag_env-host-type_' ~ cluster_id ~ '-openshift-node' }}"
+ g_etcd_hosts: "{{ (groups['tag_host-type_etcd']|default([])) | intersect((groups['tag_env_' ~ cluster_id]|default([]))) }}"
+ g_lb_hosts: "{{ (groups['tag_host-type_lb']|default([])) | intersect((groups['tag_env_' ~ cluster_id]|default([]))) }}"
+ g_master_hosts: "{{ (groups['tag_host-type_master']|default([])) | intersect((groups['tag_env_' ~ cluster_id]|default([]))) }}"
+ g_node_hosts: "{{ (groups['tag_host-type_node']|default([])) | intersect((groups['tag_env_' ~ cluster_id]|default([]))) }}"
g_ssh_user: "{{ hostvars.localhost.g_ssh_user_tmp }}"
g_sudo: "{{ hostvars.localhost.g_sudo_tmp }}"
openshift_cluster_id: "{{ cluster_id }}"
diff --git a/playbooks/openstack/openshift-cluster/files/heat_stack_server.yaml b/playbooks/openstack/openshift-cluster/files/heat_stack_server.yaml
index 9dcab3e60..3f24a3e45 100644
--- a/playbooks/openstack/openshift-cluster/files/heat_stack_server.yaml
+++ b/playbooks/openstack/openshift-cluster/files/heat_stack_server.yaml
@@ -107,12 +107,6 @@ resources:
metadata:
env: { get_param: cluster_id }
host-type: { get_param: type }
- env-host-type:
- str_replace:
- template: cluster_id-openshift-type
- params:
- cluster_id: { get_param: cluster_id }
- type: { get_param: type }
sub-host-type: { get_param: subtype }
port:
diff --git a/playbooks/openstack/openshift-cluster/launch.yml b/playbooks/openstack/openshift-cluster/launch.yml
index b18512495..491813ba8 100644
--- a/playbooks/openstack/openshift-cluster/launch.yml
+++ b/playbooks/openstack/openshift-cluster/launch.yml
@@ -70,7 +70,7 @@
ansible_ssh_host: '{{ item[2] }}'
ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
- groups: 'tag_env_{{ cluster_id }}, tag_host-type_etcd, tag_env-host-type_{{ cluster_id }}-openshift-etcd, tag_sub-host-type_default'
+ groups: 'tag_env_{{ cluster_id }}, tag_host-type_etcd, tag_sub-host-type_default'
with_together:
- parsed_outputs.etcd_names
- parsed_outputs.etcd_ips
@@ -82,7 +82,7 @@
ansible_ssh_host: '{{ item[2] }}'
ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
- groups: 'tag_env_{{ cluster_id }}, tag_host-type_master, tag_env-host-type_{{ cluster_id }}-openshift-master, tag_sub-host-type_default'
+ groups: 'tag_env_{{ cluster_id }}, tag_host-type_master, tag_sub-host-type_default'
with_together:
- parsed_outputs.master_names
- parsed_outputs.master_ips
@@ -94,7 +94,7 @@
ansible_ssh_host: '{{ item[2] }}'
ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
- groups: 'tag_env_{{ cluster_id }}, tag_host-type_node, tag_env-host-type_{{ cluster_id }}-openshift-node, tag_sub-host-type_compute'
+ groups: 'tag_env_{{ cluster_id }}, tag_host-type_node, tag_sub-host-type_compute'
with_together:
- parsed_outputs.node_names
- parsed_outputs.node_ips
@@ -106,7 +106,7 @@
ansible_ssh_host: '{{ item[2] }}'
ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
- groups: 'tag_env_{{ cluster_id }}, tag_host-type_node, tag_env-host-type_{{ cluster_id }}-openshift-node, tag_sub-host-type_infra'
+ groups: 'tag_env_{{ cluster_id }}, tag_host-type_node, tag_sub-host-type_infra'
with_together:
- parsed_outputs.infra_names
- parsed_outputs.infra_ips
diff --git a/playbooks/openstack/openshift-cluster/update.yml b/playbooks/openstack/openshift-cluster/update.yml
index e006aa74a..f2b9ffaf0 100644
--- a/playbooks/openstack/openshift-cluster/update.yml
+++ b/playbooks/openstack/openshift-cluster/update.yml
@@ -2,6 +2,12 @@
- name: Populate oo_hosts_to_update group
hosts: localhost
gather_facts: no
+ vars:
+ g_etcd_hosts: "{{ (groups['tag_host-type_etcd']|default([])) | intersect(groups['tag_env_' ~ cluster_id]) }}"
+ g_lb_hosts: "{{ (groups['tag_host-type_lb']|default([])) | intersect(groups['tag_env_' ~ cluster_id]) }}"
+ g_master_hosts: "{{ (groups['tag_host-type_master']|default([])) | intersect(groups['tag_env_' ~ cluster_id]) }}"
+ g_node_hosts: "{{ (groups['tag_host-type_node']|default([])) | intersect((groups['tag_env_' ~ cluster_id]|default([]))) }}"
+
vars_files:
- vars.yml
tasks:
@@ -11,9 +17,7 @@
groups: oo_hosts_to_update
ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
- with_items: (groups["tag_env-host-type_{{ cluster_id }}-openshift-master"] | default([]))
- | union(groups["tag_env-host-type_{{ cluster_id }}-openshift-node"] | default([]))
- | union(groups["tag_env-host-type_{{ cluster_id }}-openshift-etcd"] | default([]))
+ with_items: "{{ g_master_hosts | union(g_node_hosts) | union(g_etcd_hosts) | default([]) }}"
- include: ../../common/openshift-cluster/update_repos_and_packages.yml