From 13804dc388ccd7e8b8344de5fbbcf52395565297 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 24 Jan 2024 00:34:32 +0100 Subject: whawty/auth/store role mostly done --- roles/whawty/auth/store/tasks/main.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 roles/whawty/auth/store/tasks/main.yml (limited to 'roles/whawty/auth/store/tasks/main.yml') diff --git a/roles/whawty/auth/store/tasks/main.yml b/roles/whawty/auth/store/tasks/main.yml new file mode 100644 index 00000000..72fc61b4 --- /dev/null +++ b/roles/whawty/auth/store/tasks/main.yml @@ -0,0 +1,30 @@ +--- +- name: install rsync + apt: + name: rsync + state: present + +- name: make sure config directory exists + file: + path: /etc/whawty/auth/ + state: directory + +- name: create store base directory + file: + path: "{{ whawty_auth_store.config.basedir }}" + state: directory + mode: "{{ whawty_auth_store.permissions['dir-mode'] | default(omit) }}" + owner: "{{ whawty_auth_store.permissions.owner | default(omit) }}" + group: "{{ whawty_auth_store.permissions.group | default(omit) }}" + +- name: generate store config file + copy: + content: "{{ whawty_auth_store.config | to_nice_yaml(indent=2) }}" + dest: "/etc/whawty/auth/store-{{ whawty_auth_store.name }}.yml" + mode: "{{ whawty_auth_store.permissions['file-mode'] | default(omit) }}" + owner: "{{ whawty_auth_store.permissions.owner | default(omit) }}" + group: "{{ whawty_auth_store.permissions.group | default(omit) }}" + +- name: configure sync + when: "'sync' in whawty_auth_store" + include_tasks: "sync-{{ whawty_auth_store.sync.type }}.yml" -- cgit v1.2.3