summaryrefslogtreecommitdiffstats
path: root/playbooks/libvirt/openshift-cluster
diff options
context:
space:
mode:
authorThomas Wiest <twiest@users.noreply.github.com>2015-07-16 12:15:51 -0400
committerThomas Wiest <twiest@users.noreply.github.com>2015-07-16 12:15:51 -0400
commit68d6fdf1c1c8244b3bd2ccdf77499d9127592368 (patch)
tree0e28786664b825c97b33188bf36c42387fe59a51 /playbooks/libvirt/openshift-cluster
parenta1fe1b25b588ba995192b99e44a7950ee0c6e032 (diff)
parentf831779404b0147d6a92935cd8b77de3e25f2bec (diff)
downloadopenshift-68d6fdf1c1c8244b3bd2ccdf77499d9127592368.tar.gz
openshift-68d6fdf1c1c8244b3bd2ccdf77499d9127592368.tar.bz2
openshift-68d6fdf1c1c8244b3bd2ccdf77499d9127592368.tar.xz
openshift-68d6fdf1c1c8244b3bd2ccdf77499d9127592368.zip
Merge pull request #341 from detiber/sdodson-etcd-playbook
External clustered etcd support
Diffstat (limited to 'playbooks/libvirt/openshift-cluster')
-rw-r--r--playbooks/libvirt/openshift-cluster/config.yml33
-rw-r--r--playbooks/libvirt/openshift-cluster/update.yml4
2 files changed, 12 insertions, 25 deletions
diff --git a/playbooks/libvirt/openshift-cluster/config.yml b/playbooks/libvirt/openshift-cluster/config.yml
index 75e2005a2..98fe11251 100644
--- a/playbooks/libvirt/openshift-cluster/config.yml
+++ b/playbooks/libvirt/openshift-cluster/config.yml
@@ -3,37 +3,22 @@
# is localhost, so no hostname value (or public_hostname) value is getting
# assigned
-- name: Populate oo_masters_to_config host group
- hosts: localhost
+- hosts: localhost
gather_facts: no
vars_files:
- vars.yml
tasks:
- - name: Evaluate oo_masters_to_config
- add_host:
- name: "{{ item }}"
- ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
- ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
- groups: oo_masters_to_config
- with_items: groups["tag_env-host-type-{{ cluster_id }}-openshift-master"] | default([])
- - name: Evaluate oo_nodes_to_config
- add_host:
- name: "{{ item }}"
- ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
- ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
- groups: oo_nodes_to_config
- with_items: groups["tag_env-host-type-{{ cluster_id }}-openshift-node"] | default([])
- - name: Evaluate oo_first_master
- add_host:
- name: "{{ groups['tag_env-host-type-' ~ cluster_id ~ '-openshift-master'][0] }}"
- ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
- ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
- groups: oo_first_master
- when: "'tag_env-host-type-{{ cluster_id }}-openshift-master' in groups"
+ - set_fact:
+ g_ssh_user_tmp: "{{ deployment_vars[deployment_type].ssh_user }}"
+ g_sudo_tmp: "{{ deployment_vars[deployment_type].sudo }}"
- include: ../../common/openshift-cluster/config.yml
vars:
+ g_etcd_group: "{{ 'tag_env-host-type-' ~ cluster_id ~ '-openshift-etcd' }}"
+ g_masters_group: "{{ 'tag_env-host-type-' ~ cluster_id ~ '-openshift-master' }}"
+ g_nodes_group: "{{ 'tag_env-host-type-' ~ cluster_id ~ '-openshift-node' }}"
+ g_ssh_user: "{{ hostvars.localhost.g_ssh_user_tmp }}"
+ g_sudo: "{{ hostvars.localhost.g_sudo_tmp }}"
openshift_cluster_id: "{{ cluster_id }}"
openshift_debug_level: 4
openshift_deployment_type: "{{ deployment_type }}"
- openshift_first_master: "{{ groups.oo_first_master.0 }}"
diff --git a/playbooks/libvirt/openshift-cluster/update.yml b/playbooks/libvirt/openshift-cluster/update.yml
index 57e36db9e..d09832c16 100644
--- a/playbooks/libvirt/openshift-cluster/update.yml
+++ b/playbooks/libvirt/openshift-cluster/update.yml
@@ -11,7 +11,9 @@
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"] | union(groups["tag_env-host-type-{{ cluster_id }}-openshift-node"]) | default([])
+ 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([]))
- include: ../../common/openshift-cluster/update_repos_and_packages.yml