From 4538443750921273532d97ff653729e95bc52ad9 Mon Sep 17 00:00:00 2001 From: Tobias Florek Date: Thu, 2 Jun 2016 19:36:59 +0200 Subject: ensure htpasswd file exists Also move file mode to the file-exists check to not specify twice. --- roles/openshift_master/tasks/main.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'roles/openshift_master/tasks') 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') }}" -- cgit v1.2.3