code cleanup
This commit is contained in:
parent
4317a4c92c
commit
99b32b4f76
1 changed files with 10 additions and 6 deletions
|
|
@ -1,12 +1,16 @@
|
||||||
|
- set_fact:
|
||||||
|
current_users: "{{ htpasswdfile[passfile].users }}"
|
||||||
|
current_file: "{{ htpasswdfile[passfile] }}"
|
||||||
|
|
||||||
- name: set user and pw
|
- name: set user and pw
|
||||||
no_log: True
|
no_log: True
|
||||||
with_items: "{{ htpasswdfile[passfile].users }}"
|
loop: "{{ current_users }}"
|
||||||
htpasswd:
|
htpasswd:
|
||||||
crypt_scheme: "{{ htpasswdfile[passfile].crypt_scheme|d('apr_md5_crypt') }}"
|
crypt_scheme: "{{ current_file.crypt_scheme|d('apr_md5_crypt') }}"
|
||||||
path: "{{ htpasswdfile[passfile].path }}"
|
path: "{{ current_file.path }}"
|
||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
password: "{{ item.pw }}"
|
password: "{{ item.pw }}"
|
||||||
owner: "{{ htpasswdfile[passfile].owner|d('root') }}"
|
owner: "{{ current_file.owner|d('root') }}"
|
||||||
group: "{{ htpasswdfile[passfile].group|d('www-data') }}"
|
group: "{{ current_file.group|d('www-data') }}"
|
||||||
mode: "{{ htpasswdfile[passfile].mode|d('0640') }}"
|
mode: "{{ current_file.mode|d('0640') }}"
|
||||||
state: "{{ item.state|d('present') }}"
|
state: "{{ item.state|d('present') }}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue