Skip to content

Commit

Permalink
fix user references
Browse files Browse the repository at this point in the history
  • Loading branch information
suhancz committed Oct 29, 2023
1 parent 066cc52 commit 50bf014
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/dyndns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions tasks/wireguard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 50bf014

Please sign in to comment.