Skip to content

Commit

Permalink
certificates: Update creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Rodier committed May 4, 2023
1 parent 9a7a6fd commit 7a2bbd5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions roles/certificates/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
certificates:
- name: default
- name: main
- name: _

# Do not recreate the certificates by default,
# unless they are not valid
Expand Down
11 changes: 11 additions & 0 deletions roles/certificates/tasks/dns-facts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@
tags: certs

- name: Chheck if the DNS server is resolving correctly
when: certificate.name == '_'
register: host_test
shell: >-
host {{ lookup('random_string') }}.{{ network.domain }}
{{ dns_servers[0] }} | grep {{ fqdn | regex_escape }}
ignore_errors: true
changed_when: false
tags: dns

- name: Chheck if the DNS server is resolving correctly
when: certificate.name != '_'
register: host_test
shell: >-
host {{ certificate.name }}.{{ network.domain }}
Expand Down

0 comments on commit 7a2bbd5

Please sign in to comment.