49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
- name: Check that passwords.yaml exists
|
|
stat:
|
|
path: "{{ inventory_dir }}/group_vars/all/passwords.yaml"
|
|
register: passwords_file
|
|
|
|
- name: Create passwords.yaml file if not exists
|
|
file:
|
|
name: "{{ inventory_dir }}/group_vars/all/passwords.yaml"
|
|
state: touch
|
|
when: not passwords_file.stat.exists
|
|
|
|
- name: Read passwords.yaml file
|
|
slurp:
|
|
src: "{{ inventory_dir }}/group_vars/all/passwords.yaml"
|
|
register: passwords_b64
|
|
|
|
- name: Set facts about passwords
|
|
set_fact:
|
|
passwords: "{{ passwords_b64['content'] | b64decode | from_yaml }}"
|
|
|
|
- name: Create files directory for ddclient tsig
|
|
file:
|
|
name: "{{ playbook_dir }}/files/{{ namespace }}"
|
|
state: directory
|
|
|
|
- include_tasks: passwords.yaml
|
|
loop: "{{ default_accounts }}"
|
|
|
|
- include_tasks: secrets.yaml
|
|
loop: "{{ secret_keys }}"
|
|
|
|
- include_tasks: htpasswd.yaml
|
|
loop: "{{ htpasswd_accounts }}"
|
|
|
|
- include_tasks: passwords.yaml
|
|
loop: "{{ openldap_custom_users }}"
|
|
when: openldap_custom_users is defined
|
|
|
|
- include_tasks: passwords.yaml
|
|
loop: "{{ openldap_simple_users }}"
|
|
when: openldap_simple_users is defined
|
|
|
|
- include_tasks: tsig.yaml
|
|
|
|
- include_tasks: dkim.yaml
|
|
|
|
- include_tasks: vapid.yaml
|
|
loop: "{{ vapid_keys }}"
|