summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-06-06 13:48:20 -0400
committerScott Dodson <sdodson@redhat.com>2016-06-06 13:48:20 -0400
commit7af4c6823c6e86e2c8dd7b1a984ead45450b80d3 (patch)
tree7fa54a14b458b54767c81bbf996f42db6b5a4d0e
parent7e4bb24498bb21c57ff141058caefeaa23f86549 (diff)
parent4538443750921273532d97ff653729e95bc52ad9 (diff)
downloadopenshift-7af4c6823c6e86e2c8dd7b1a984ead45450b80d3.tar.gz
openshift-7af4c6823c6e86e2c8dd7b1a984ead45450b80d3.tar.bz2
openshift-7af4c6823c6e86e2c8dd7b1a984ead45450b80d3.tar.xz
openshift-7af4c6823c6e86e2c8dd7b1a984ead45450b80d3.zip
Merge pull request #1973 from ibotty/preserve_htpasswd
Add flag to manage htpasswd, or not.
-rw-r--r--roles/openshift_master/tasks/main.yml10
-rw-r--r--roles/openshift_master_facts/tasks/main.yml1
2 files changed, 10 insertions, 1 deletions
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index f70eaf144..52ea8bccf 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -91,8 +91,16 @@
template:
dest: "{{ item.filename }}"
src: htpasswd.j2
- mode: 0600
backup: yes
+ when: item.kind == 'HTPasswdPasswordIdentityProvider' and openshift.master.manage_htpasswd | bool
+ with_items: "{{ openshift.master.identity_providers }}"
+
+- name: Ensure htpasswd file exists
+ copy:
+ dest: "{{ item.filename }}"
+ force: no
+ content: ""
+ mode: 0600
when: item.kind == 'HTPasswdPasswordIdentityProvider'
with_items: "{{ openshift.master.identity_providers }}"
diff --git a/roles/openshift_master_facts/tasks/main.yml b/roles/openshift_master_facts/tasks/main.yml
index 896dd5e35..d51c5a0a3 100644
--- a/roles/openshift_master_facts/tasks/main.yml
+++ b/roles/openshift_master_facts/tasks/main.yml
@@ -42,6 +42,7 @@
auth_token_max_seconds: "{{ openshift_master_auth_token_max_seconds | default(None) }}"
identity_providers: "{{ openshift_master_identity_providers | default(None) }}"
htpasswd_users: "{{ openshift_master_htpasswd_users | default(lookup('file', openshift_master_htpasswd_file) | oo_htpasswd_users_from_file if openshift_master_htpasswd_file is defined else None) }}"
+ manage_htpasswd: "{{ openshift_master_manage_htpasswd | default(true) }}"
ldap_ca: "{{ openshift_master_ldap_ca | default(lookup('file', openshift_master_ldap_ca_file) if openshift_master_ldap_ca_file is defined else None) }}"
openid_ca: "{{ openshift_master_openid_ca | default(lookup('file', openshift_master_openid_ca_file) if openshift_master_openid_ca_file is defined else None) }}"
request_header_ca: "{{ openshift_master_request_header_ca | default(lookup('file', openshift_master_request_header_ca_file) if openshift_master_request_header_ca_file is defined else None) }}"