From b232b894c3cbe087c8d504e91637dcf62199eed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Thu, 29 Jul 2021 17:00:20 +0200 Subject: Bump to third revision of homelab --- roles/htpasswd/tasks/main.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 roles/htpasswd/tasks/main.yml (limited to 'roles/htpasswd/tasks') 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_ }}" -- cgit v1.2.3