summaryrefslogtreecommitdiffstats
path: root/playbooks/openstack/openshift-cluster
diff options
context:
space:
mode:
authorThomas Wiest <twiest@users.noreply.github.com>2015-12-14 12:47:51 -0500
committerThomas Wiest <twiest@users.noreply.github.com>2015-12-14 12:47:51 -0500
commit4dfe16e0e567a633cedd8ee56ffaed5110ca1629 (patch)
treeaa67c9a14ae30cf02177e53ae3e8d1e9c878f1c8 /playbooks/openstack/openshift-cluster
parenteeb164fae0e6721100c4fcc1717d92bb85b9652c (diff)
parent4322b19c0503a4f149ac5bca251beba14178948d (diff)
downloadopenshift-4dfe16e0e567a633cedd8ee56ffaed5110ca1629.tar.gz
openshift-4dfe16e0e567a633cedd8ee56ffaed5110ca1629.tar.bz2
openshift-4dfe16e0e567a633cedd8ee56ffaed5110ca1629.tar.xz
openshift-4dfe16e0e567a633cedd8ee56ffaed5110ca1629.zip
Merge pull request #1059 from twiest/master
sync master -> prod branch
Diffstat (limited to 'playbooks/openstack/openshift-cluster')
-rw-r--r--playbooks/openstack/openshift-cluster/config.yml10
-rw-r--r--playbooks/openstack/openshift-cluster/files/heat_stack_server.yaml6
-rw-r--r--playbooks/openstack/openshift-cluster/launch.yml9
-rw-r--r--playbooks/openstack/openshift-cluster/list.yml4
-rw-r--r--playbooks/openstack/openshift-cluster/terminate.yml2
-rw-r--r--playbooks/openstack/openshift-cluster/update.yml12
6 files changed, 26 insertions, 17 deletions
diff --git a/playbooks/openstack/openshift-cluster/config.yml b/playbooks/openstack/openshift-cluster/config.yml
index 888804e28..da7b5cc49 100644
--- a/playbooks/openstack/openshift-cluster/config.yml
+++ b/playbooks/openstack/openshift-cluster/config.yml
@@ -1,5 +1,7 @@
- hosts: localhost
gather_facts: no
+ become: no
+ connection: local
vars_files:
- vars.yml
tasks:
@@ -9,10 +11,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..876ca595a 100644
--- a/playbooks/openstack/openshift-cluster/launch.yml
+++ b/playbooks/openstack/openshift-cluster/launch.yml
@@ -1,6 +1,7 @@
---
- name: Launch instance(s)
hosts: localhost
+ become: no
connection: local
gather_facts: no
vars_files:
@@ -70,7 +71,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 +83,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 +95,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 +107,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/list.yml b/playbooks/openstack/openshift-cluster/list.yml
index fa194b072..436d3e6f7 100644
--- a/playbooks/openstack/openshift-cluster/list.yml
+++ b/playbooks/openstack/openshift-cluster/list.yml
@@ -1,6 +1,8 @@
---
- name: Generate oo_list_hosts group
hosts: localhost
+ become: no
+ connection: local
gather_facts: no
vars_files:
- vars.yml
@@ -22,6 +24,8 @@
- name: List Hosts
hosts: localhost
+ become: no
+ connection: local
gather_facts: no
vars_files:
- vars.yml
diff --git a/playbooks/openstack/openshift-cluster/terminate.yml b/playbooks/openstack/openshift-cluster/terminate.yml
index 62df2be73..2a7f04505 100644
--- a/playbooks/openstack/openshift-cluster/terminate.yml
+++ b/playbooks/openstack/openshift-cluster/terminate.yml
@@ -1,5 +1,6 @@
- name: Terminate instance(s)
hosts: localhost
+ become: no
connection: local
gather_facts: no
vars_files:
@@ -25,6 +26,7 @@
default('no', True) | lower in ['no', 'false']
- hosts: localhost
+ become: no
connection: local
gather_facts: no
vars_files:
diff --git a/playbooks/openstack/openshift-cluster/update.yml b/playbooks/openstack/openshift-cluster/update.yml
index e006aa74a..4ecf75a5d 100644
--- a/playbooks/openstack/openshift-cluster/update.yml
+++ b/playbooks/openstack/openshift-cluster/update.yml
@@ -1,7 +1,15 @@
---
- name: Populate oo_hosts_to_update group
hosts: localhost
+ become: no
+ connection: local
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 +19,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