-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
619 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
tasks/ssl.yml schema[tasks] # no idea why the linter complains on this one, the whole thing works | ||
meta/main.yml schema[meta] # the platform EL versin 8 does exist - not sure why the liner complains about it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,14 +15,12 @@ Role Variables | |
aliases: | ||
- [email protected] | ||
- [email protected] | ||
old_imap_mail: # Dovecot imapc configuration values | ||
host | ||
ssl | ||
ssl_verify | ||
port | ||
user | ||
password | ||
sync: yes # this boolean is not a default Dovecot thing. indicates if mailbox should be daily synced after the initial copy | ||
old_imap_mail: # connection info to the old IMAP address to sync | ||
host # hostname or IP address of the remote mail server | ||
user # login user to the remote mail server | ||
password # password to log in to the remote mail server | ||
sync: yes # indicates if mailbox should be daily synced after the initial copy | ||
imap_dedup # boolean if e-mails should be deduplicated daily | ||
vpn: # WireGuard setup - if a user doesn't have VPN info defined, a client with their name will be generated by default | ||
- name: client1 # name metadata to identify the VPN client - this should be unique among all users | ||
privatekey: # WireGuard private key for the client | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
- name: Add DynDNS NS records | ||
tags: | ||
- dyndns | ||
- poweradmin | ||
ansible.builtin.include_tasks: add_dns_record.yml | ||
vars: | ||
record: | ||
zone: "{% if dyndns_item | length > 0 %}dyndns.{% endif %}{{ mailserver_domain }}" | ||
name: "{{ wg_configs[dyndns_item]['owner'] | default('dyndns') }}" | ||
ttl: "3600" | ||
type: NS | ||
content: "ns.{{ mailserver_domain }}" | ||
- name: Add DynDNS A records | ||
tags: | ||
- dyndns | ||
- poweradmin | ||
ansible.builtin.include_tasks: add_dns_record.yml | ||
vars: | ||
record: | ||
zone: "{% if dyndns_item | length > 0 %}{{ wg_configs[dyndns_item]['owner'] }}.{% endif %}dyndns.{{ mailserver_domain }}" | ||
name: "{% if dyndns_item | length > 0 %}{{ dyndns_item }}{% else %}@{% endif %}" | ||
ttl: "3600" | ||
type: A | ||
content: "{% if dyndns_item | length > 0 %}{{ wg_configs[dyndns_item]['cidr'].split(', ') | first }}{% else %}{{ ansible_default_ipv4.address }}{% endif %}" | ||
- name: Add DynDNS AAAA records | ||
tags: | ||
- dyndns | ||
- poweradmin | ||
ansible.builtin.include_tasks: add_dns_record.yml | ||
vars: | ||
record: | ||
zone: "{% if dyndns_item | length > 0 %}{{ wg_configs[dyndns_item]['owner'] }}.{% endif %}dyndns.{{ mailserver_domain }}" | ||
name: "{% if dyndns_item | length > 0 %}{{ dyndns_item }}{% else %}@{% endif %}" | ||
ttl: "3600" | ||
type: AAAA | ||
content: "{% if dyndns_item | length > 0 %}{{ wg_configs[dyndns_item]['cidr'].split(', ') | last }}{% else %}{{ ansible_default_ipv6.address }}{% endif %}" | ||
- name: Configure PowerDNS recursor to forward DynDNS domains | ||
tags: | ||
- dyndns | ||
- poweradmin | ||
ansible.builtin.lineinfile: | ||
path: /etc/pdns-recursor/recursor.conf | ||
line: "forward-zones+={% if dyndns_item | length > 0 %}{{ wg_configs[dyndns_item]['owner'] }}.{% endif %}dyndns.{{ mailserver_domain }}=127.0.0.1:5300" | ||
regex: "^forward-zones+={% if dyndns_item | length > 0 %}{{ wg_configs[dyndns_item]['owner'] }}.{% endif %}dyndns.{{ mailserver_domain }}=" | ||
state: present | ||
backup: yes | ||
no_log: yes | ||
when: public_dns == "yes" | ||
notify: Restart pdns-recursor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.