ansible-selfhosted-services/playbooks/nsupdate.yml
2020-03-24 01:04:18 +01:00

39 lines
1 KiB
YAML

---
- hosts: localhost
connection: local
tasks:
- name: Add subdomains as CNAMEs to hh01.jotbe.io
nsupdate:
key_name: "{{ nsupdate_key_name }}"
key_algorithm: "{{ nsupdate_key_algorithm }}"
key_secret: "{{ nsupdate_private_key }}"
server: "{{ nsupdate_dns_server_name }}"
zone: hh01.jotbe.io
record: "{{ item }}"
type: CNAME
ttl: 600
value: hh01.jotbe.io.
with_items:
- cloud
- hl
- nextcloud
- gitea
- trilium
- drone
- name: Remove subdomain CNAMEs from hh01.jotbe.io
nsupdate:
key_name: "{{ nsupdate_key_name }}"
key_algorithm: "{{ nsupdate_key_algorithm }}"
key_secret: "{{ nsupdate_private_key }}"
server: "{{ nsupdate_dns_server_name }}"
zone: hh01.jotbe.io
record: "{{ item }}"
type: CNAME
ttl: 600
value: hh01.jotbe.io.
state: absent
with_items:
- notes
- plex
- emby
- jellyfin