Skip to content
Snippets Groups Projects
Commit 6c667a1b authored by jurgenhaas's avatar jurgenhaas
Browse files

Always create password directory and switch command from shell to Ansible command

parent 06f989c6
No related branches found
No related tags found
No related merge requests found
......@@ -105,8 +105,13 @@
state=directory
owner=www-data
group=www-data
when: apache_auth
- name: "Apache | Setup AuthType Basic"
shell: htpasswd -bc /var/www/passwords/{{ apache_auth.user }} {{ apache_auth.user }} {{ apache_auth.password }}
htpasswd:
path="/var/www/passwords/{{ apache_auth.user }}"
name="{{ apache_auth.user }}"
password="{{ apache_auth.password }}"
owner=www-data
group=www-data
mode=640
when: apache_auth
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment