summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-node
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/common/openshift-node
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/common/openshift-node')
-rw-r--r--playbooks/common/openshift-node/config.yml39
l---------playbooks/common/openshift-node/lookup_plugins1
2 files changed, 15 insertions, 25 deletions
diff --git a/playbooks/common/openshift-node/config.yml b/playbooks/common/openshift-node/config.yml
index 1cf5616ce..bd35008b8 100644
--- a/playbooks/common/openshift-node/config.yml
+++ b/playbooks/common/openshift-node/config.yml
@@ -18,21 +18,18 @@
deployment_type: "{{ openshift_deployment_type }}"
- role: node
local_facts:
- resources_cpu: "{{ openshift_node_resources_cpu | default(None) }}"
- resources_memory: "{{ openshift_node_resources_memory | default(None) }}"
- pod_cidr: "{{ openshift_node_pod_cidr | default(None) }}"
labels: "{{ openshift_node_labels | default(None) }}"
annotations: "{{ openshift_node_annotations | default(None) }}"
- name: Check status of node certificates
stat:
- path: "{{ item }}"
+ path: "/etc/openshift/node/{{ item }}"
with_items:
- - "/etc/openshift/node/system:node:{{ openshift.common.hostname }}.crt"
- - "/etc/openshift/node/system:node:{{ openshift.common.hostname }}.key"
- - "/etc/openshift/node/system:node:{{ openshift.common.hostname }}.kubeconfig"
- - "/etc/openshift/node/ca.crt"
- - "/etc/openshift/node/server.key"
- - "/etc/openshift/node/server.crt"
+ - "system:node:{{ openshift.common.hostname }}.crt"
+ - "system:node:{{ openshift.common.hostname }}.key"
+ - "system:node:{{ openshift.common.hostname }}.kubeconfig"
+ - ca.crt
+ - server.key
+ - server.crt
register: stat_result
- set_fact:
certs_missing: "{{ stat_result.results | map(attribute='stat.exists')
@@ -56,10 +53,9 @@
hosts: oo_first_master
vars:
nodes_needing_certs: "{{ hostvars
- | oo_select_keys(groups['oo_nodes_to_config'])
+ | oo_select_keys(groups['oo_nodes_to_config']
+ | default([]))
| oo_filter_list(filter_attr='certs_missing') }}"
- openshift_nodes: "{{ hostvars
- | oo_select_keys(groups['oo_nodes_to_config']) }}"
sync_tmpdir: "{{ hostvars.localhost.mktemp.stdout }}"
roles:
- openshift_node_certificates
@@ -86,7 +82,7 @@
hosts: oo_nodes_to_config
vars:
sync_tmpdir: "{{ hostvars.localhost.mktemp.stdout }}"
- openshift_node_master_api_url: "{{ hostvars[openshift_first_master].openshift.master.api_url }}"
+ openshift_node_master_api_url: "{{ hostvars[groups.oo_first_master.0].openshift.master.api_url }}"
pre_tasks:
- name: Ensure certificate directory exists
file:
@@ -110,15 +106,6 @@
group_by: key=oo_nodes_deployment_type_{{ openshift.common.deployment_type }}
changed_when: False
-- name: Delete the temporary directory on the master
- hosts: oo_first_master
- gather_facts: no
- vars:
- sync_tmpdir: "{{ hostvars.localhost.mktemp.stdout }}"
- tasks:
- - file: name={{ sync_tmpdir }} state=absent
- changed_when: False
-
- name: Delete temporary directory on localhost
hosts: localhost
connection: local
@@ -143,12 +130,14 @@
| oo_select_keys(groups['oo_nodes_to_config'])
| oo_collect('openshift.common.hostname') }}"
openshift_unscheduleable_nodes: "{{ hostvars
- | oo_select_keys(groups['oo_nodes_to_config'])
+ | oo_select_keys(groups['oo_nodes_to_config']
+ | default([]))
| oo_collect('openshift.common.hostname', {'openshift_scheduleable': False}) }}"
pre_tasks:
- set_fact:
openshift_scheduleable_nodes: "{{ hostvars
- | oo_select_keys(groups['oo_nodes_to_config'])
+ | oo_select_keys(groups['oo_nodes_to_config']
+ | default([]))
| oo_collect('openshift.common.hostname')
| difference(openshift_unscheduleable_nodes) }}"
roles:
diff --git a/playbooks/common/openshift-node/lookup_plugins b/playbooks/common/openshift-node/lookup_plugins
new file mode 120000
index 000000000..ac79701db
--- /dev/null
+++ b/playbooks/common/openshift-node/lookup_plugins
@@ -0,0 +1 @@
+../../../lookup_plugins \ No newline at end of file