aboutsummaryrefslogtreecommitdiffstats
path: root/roles/htpasswd/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/htpasswd/tasks/main.yml')
-rw-r--r--roles/htpasswd/tasks/main.yml11
1 files changed, 11 insertions, 0 deletions
diff --git a/roles/htpasswd/tasks/main.yml b/roles/htpasswd/tasks/main.yml
new file mode 100644
index 0000000..9586c82
--- /dev/null
+++ b/roles/htpasswd/tasks/main.yml
@@ -0,0 +1,11 @@
+- name: ensure htpasswd service is specified
+ fail:
+ when:
+
+- name: set variable for realm generation
+ set_facts:
+ htpasswd_credentials_: "{{ htpasswd_user }}:{{ htpasswd_password }}"
+ htpasswd_file_: "{{ htpasswd_dir }}/{{ htpasswd_service }}"
+
+- name: generate realm file
+ shell: echo "{{ htpasswd_credentials_ }}" | htpasswd -I "{{ htpasswd_file_ }}"
remember that computers suck.