diff --git a/defaults/main.yml b/defaults/main.yaml similarity index 100% rename from defaults/main.yml rename to defaults/main.yaml diff --git a/handlers/main.yml b/handlers/main.yaml similarity index 100% rename from handlers/main.yml rename to handlers/main.yaml diff --git a/tasks/main.yml b/tasks/main.yaml similarity index 51% rename from tasks/main.yml rename to tasks/main.yaml index 0980574..67ba572 100644 --- a/tasks/main.yml +++ b/tasks/main.yaml @@ -33,32 +33,12 @@ - conf.d/10-master.conf - conf.d/10-mail.conf - conf.d/10-auth.conf - - conf.d/auth-sql.conf.ext - - dovecot-sql.conf.ext + - conf.d/auth-{{dovecot_auth}}.conf.ext - conf.d/10-ssl.conf - conf.d/20-lmtp.conf - conf.d/90-plugin.conf notify: - reload dovecot -- name: postfixadmin mysql user - mysql_user: - name: "{{dovecot_postfixadmin_mysql_username}}" - password: "{{dovecot_postfixadmin_mysql_password}}" - priv: "{{dovecot_postfixadmin_mysql_database}}.*:SELECT" - host: "{{inventory_hostname}}" - state: present - delegate_to: "{{dovecot_postfixadmin_mysql_host}}" - -- name: configuration pull directory - local_action: file - args: - path: ~/host_files/{{inventory_hostname}}/etc - state: directory - -- name: pull configuration - synchronize: - src: /etc/dovecot - dest: ~/host_files/{{inventory_hostname}}/etc/ - mode: pull - recursive: true +- import_tasks: sql.yaml + when: "{{ dovecot_auth == 'sql' }}"