summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node/tasks/bootstrap.yml
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-08-30 17:47:48 -0400
committerKenny Woodson <kwoodson@redhat.com>2017-09-07 14:41:24 -0400
commitefe86b44bce679db38cca654818dc3837bb05f6a (patch)
tree3bf6d09a2906aea8784073aece30ec22b82788f2 /roles/openshift_node/tasks/bootstrap.yml
parent63ecca817c45242f3db0495d99b947ba0471789e (diff)
downloadopenshift-efe86b44bce679db38cca654818dc3837bb05f6a.tar.gz
openshift-efe86b44bce679db38cca654818dc3837bb05f6a.tar.bz2
openshift-efe86b44bce679db38cca654818dc3837bb05f6a.tar.xz
openshift-efe86b44bce679db38cca654818dc3837bb05f6a.zip
Consolidating AWS roles and variables underneath openshift_aws role.
Diffstat (limited to 'roles/openshift_node/tasks/bootstrap.yml')
-rw-r--r--roles/openshift_node/tasks/bootstrap.yml33
1 files changed, 22 insertions, 11 deletions
diff --git a/roles/openshift_node/tasks/bootstrap.yml b/roles/openshift_node/tasks/bootstrap.yml
index cb1440283..b83b2c452 100644
--- a/roles/openshift_node/tasks/bootstrap.yml
+++ b/roles/openshift_node/tasks/bootstrap.yml
@@ -42,14 +42,25 @@
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
- - openshift_deployment_type in ['openshift-enterprise', 'atomic-enterprise']
- with_items:
- - master
- - node
- - .config_managed
+- when: rpmgenerated_config.stat.exists
+ block:
+ - name: Remove RPM generated config files if present
+ file:
+ path: "/etc/origin/{{ item }}"
+ state: absent
+ with_items:
+ - master
+
+ # with_fileglob doesn't work correctly due to a few issues.
+ # Could change this to fileglob when it gets fixed.
+ - name: find all files in /etc/origin/node so we can remove them
+ find:
+ path: /etc/origin/node/
+ register: find_results
+
+ - name: Remove everything except the resolv.conf required for node
+ file:
+ path: "{{ item.path }}"
+ state: absent
+ when: "'resolv.conf' not in item.path or 'node-dnsmasq.conf' not in item.path"
+ with_items: "{{ find_results.files }}"