summaryrefslogtreecommitdiff
path: root/playbook.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'playbook.yaml')
-rw-r--r--playbook.yaml15
1 files changed, 15 insertions, 0 deletions
diff --git a/playbook.yaml b/playbook.yaml
index 06ebc59..64c0243 100644
--- a/playbook.yaml
+++ b/playbook.yaml
@@ -180,6 +180,21 @@
{{ acme_account_uri_nonprod }}\""
delegate_to: localhost
+ - name: Ensure anonymous records are added to subdomain, if needed
+ ansible.builtin.uri:
+ url: "https://desec.io/api/v1/domains/{{ virtual_host }}/rrsets/"
+ method: PUT
+ body_format: json
+ headers:
+ Authorization: Token {{ desec_token }}
+ body:
+ - subname: "anon"
+ type: CNAME
+ ttl: 3600
+ records: ["{{ delegate_host }}."]
+ delegate_to: localhost
+ when: anonymous_login
+
# We specifically use apt instead of the more general package module here,
# because we want to ensure the cache is updated before we try and install
# anything. This is needed because, on a freh Debian install on AWS