summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Florek <tob@butter.sh>2016-06-02 19:36:59 +0200
committerTobias Florek <tob@butter.sh>2016-06-06 09:51:21 +0200
commit4538443750921273532d97ff653729e95bc52ad9 (patch)
tree4b1ad31cb3d63d3a2cf7d09388a82299d61c2b2c
parente7bba72cd95159179b5afd4f2b9e6f6d48cba0df (diff)
downloadopenshift-4538443750921273532d97ff653729e95bc52ad9.tar.gz
openshift-4538443750921273532d97ff653729e95bc52ad9.tar.bz2
openshift-4538443750921273532d97ff653729e95bc52ad9.tar.xz
openshift-4538443750921273532d97ff653729e95bc52ad9.zip
ensure htpasswd file exists
Also move file mode to the file-exists check to not specify twice.
-rw-r--r--roles/openshift_master/tasks/main.yml10
1 files changed, 9 insertions, 1 deletions
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index 8ae169dfb..476ed4b0c 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -91,11 +91,19 @@
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 }}"
+
- name: Create the ldap ca file if needed
copy:
dest: "{{ item.ca if 'ca' in item and '/' in item.ca else openshift_master_config_dir ~ '/' ~ item.ca | default('ldap_ca.crt') }}"