summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2015-10-22 15:58:27 -0400
committerBrenton Leanhardt <bleanhar@redhat.com>2015-10-22 15:58:27 -0400
commitab959a27d43b1f3a1ef1bbc6eccdde24be1c89f0 (patch)
tree1fc9fd81c4f77f497bacaf065786d7f02e20b97d
parent7643bda1cd06a3b1bd57f1fde9b9d72ddde01736 (diff)
parent3e44d3aa6d35c62c57c102f5a8fec4bf86d2a1b5 (diff)
downloadopenshift-ab959a27d43b1f3a1ef1bbc6eccdde24be1c89f0.tar.gz
openshift-ab959a27d43b1f3a1ef1bbc6eccdde24be1c89f0.tar.bz2
openshift-ab959a27d43b1f3a1ef1bbc6eccdde24be1c89f0.tar.xz
openshift-ab959a27d43b1f3a1ef1bbc6eccdde24be1c89f0.zip
Merge pull request #730 from detiber/rpmGen
Fix test and workaround for rpm generated configs
-rw-r--r--playbooks/common/openshift-master/config.yml15
-rw-r--r--roles/openshift_master/tasks/main.yml14
2 files changed, 15 insertions, 14 deletions
diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml
index 0d78eca30..0a3fe90e1 100644
--- a/playbooks/common/openshift-master/config.yml
+++ b/playbooks/common/openshift-master/config.yml
@@ -2,6 +2,21 @@
- name: Set master facts and determine if external etcd certs need to be generated
hosts: oo_masters_to_config
pre_tasks:
+ - name: Check for RPM generated config marker file .config_managed
+ stat:
+ path: /etc/origin/.config_managed
+ register: rpmgenerated_config
+
+ - name: Remove RPM generated config files if present
+ file:
+ path: "/etc/origin/{{ item }}"
+ state: absent
+ when: rpmgenerated_config.stat.exists == true and deployment_type in ['openshift-enterprise', 'atomic-enterprise']
+ with_items:
+ - master
+ - node
+ - .config_managed
+
- set_fact:
openshift_master_etcd_port: "{{ (etcd_client_port | default('2379')) if (groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config) else none }}"
openshift_master_etcd_hosts: "{{ hostvars
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index 4dcab31d1..a5c1a805c 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -62,20 +62,6 @@
yum: pkg={{ openshift.common.service_type }}-master{{ openshift_version }} state=present
register: install_result
-- name: Check for RPM generated config marker file /etc/origin/.config_managed
- stat: path=/etc/origin/.rpmgenerated
- register: rpmgenerated_config
-
-- name: Remove RPM generated config files
- file:
- path: "{{ item }}"
- state: absent
- when: openshift.common.service_type in ['atomic-enterprise','openshift-enterprise'] and rpmgenerated_config.stat.exists == true
- with_items:
- - "{{ openshift.common.config_base }}/master"
- - "{{ openshift.common.config_base }}/node"
- - "{{ openshift.common.config_base }}/.rpmgenerated"
-
# TODO: These values need to be configurable
- name: Set dns facts
openshift_facts: