diff --git a/tasks/dyndns.yml b/tasks/dyndns.yml index 87ab309..7f82463 100644 --- a/tasks/dyndns.yml +++ b/tasks/dyndns.yml @@ -193,8 +193,8 @@ login_user: '{{ mailserver_admin_user }}@{{ mailserver_domain }}' login_password: "{{ users | selectattr('name', 'equalto', mailserver_admin_user) | map(attribute='password') | first }}" query: - - REPLACE INTO `users` (`username`, `password`, `fullname`, `email`, `description`, `perm_templ`, `active`, `use_ldap`) VALUES ('{{ user.name }}', '{{ user | map(attribute="password") | first | password_hash("blowfish") | replace("$2b$", "$2y$") }}', 'Dynamic DNS for user {{ user.name }}', '{{ user.name }}@{{ mailserver_domain }}', 'DNS updates for user {{ user.name }}', 2, 1, 0) - - "REPLACE INTO `zones` (`domain_id`, `owner`, `comment`, `zone_templ_id`) SELECT domains.id, users.id, '', 0 FROM domains, users WHERE domains.name = '{{ user.name }}.dyndns.{{ mailserver_domain }}' and users.username = '{{ user.nmame }}'" + - REPLACE INTO `users` (`username`, `password`, `fullname`, `email`, `description`, `perm_templ`, `active`, `use_ldap`) VALUES ('{{ user.name }}', '{{ user.password | password_hash("blowfish") | replace("$2b$", "$2y$") }}', 'Dynamic DNS for user {{ user.name }}', '{{ user.name }}@{{ mailserver_domain }}', 'DNS updates for user {{ user.name }}', 2, 1, 0) + - "REPLACE INTO `zones` (`domain_id`, `owner`, `comment`, `zone_templ_id`) SELECT domains.id, users.id, '', 0 FROM domains, users WHERE domains.name = '{{ user.name }}.dyndns.{{ mailserver_domain }}' and users.username = '{{ user.name }}'" no_log: yes - name: Generate generic BASH DynDNS clients tags: diff --git a/tasks/wireguard.yml b/tasks/wireguard.yml index 8f46482..fdc2967 100644 --- a/tasks/wireguard.yml +++ b/tasks/wireguard.yml @@ -70,6 +70,7 @@ mode: u=rwX,go=rX loop: - /etc/wireguard/clients + - /etc/wireguard/clients/generic - /etc/wireguard/helper - "{{ wireguard.config_dir }}" - /var/www/html/.vpn