added support for different owner and crypt_scheme

This commit is contained in:
nd 2018-11-01 21:18:55 +01:00
parent f727f839e9
commit 22340271b1
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
2 changed files with 9 additions and 3 deletions

View file

@ -1,9 +1,11 @@
- name: set user and pw
with_items: "{{ htpasswdfile[passfile].users }}"
htpasswd:
crypt_scheme: "{{ htpasswdfile[passfile].crypt_scheme|d('apr_md5_crypt') }}"
path: "{{ htpasswdfile[passfile].path }}"
name: "{{ item.name }}"
password: "{{ item.pw }}"
owner: root
group: www-data
mode: 0640
owner: "{{htpasswdfile[passfile].owner|d('root') }}"
group: "{{htpasswdfile[passfile].group|d('www-data') }}"
mode: "{{htpasswdfile[passfile].mode|d('0640') }}"
state: "{{htpasswdfile[passfile].state|d('present') }}"