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
|
||||
no_log: True
|
||||
with_items: "{{ htpasswdfile[passfile].users }}"
|
||||
loop: "{{ current_users }}"
|
||||
htpasswd:
|
||||
crypt_scheme: "{{ htpasswdfile[passfile].crypt_scheme|d('apr_md5_crypt') }}"
|
||||
path: "{{ htpasswdfile[passfile].path }}"
|
||||
crypt_scheme: "{{ current_file.crypt_scheme|d('apr_md5_crypt') }}"
|
||||
path: "{{ current_file.path }}"
|
||||
name: "{{ item.name }}"
|
||||
password: "{{ item.pw }}"
|
||||
owner: "{{ htpasswdfile[passfile].owner|d('root') }}"
|
||||
group: "{{ htpasswdfile[passfile].group|d('www-data') }}"
|
||||
mode: "{{ htpasswdfile[passfile].mode|d('0640') }}"
|
||||
owner: "{{ current_file.owner|d('root') }}"
|
||||
group: "{{ current_file.group|d('www-data') }}"
|
||||
mode: "{{ current_file.mode|d('0640') }}"
|
||||
state: "{{ item.state|d('present') }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue