--- - 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"