mirror of
https://github.com/nikdoof/ansible-certbot.git
synced 2025-12-11 14:42:16 +00:00
Update facts access for later Ansible versions
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
- name: Certbot - Get OS specific vars
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- "os/{{ ansible_os_family }}/{{ ansible_distribution_major_version }}.yaml"
|
||||
- "os/{{ ansible_os_family }}.yaml"
|
||||
- "os/{{ ansible_facts['os_family'] }}/{{ ansible_facts['distribution_major_version'] }}.yaml"
|
||||
- "os/{{ ansible_facts['os_family'] }}.yaml"
|
||||
|
||||
- name: Certbot - Install Certbot
|
||||
ansible.builtin.import_tasks: install.yaml
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
- name: Certbot - Add host FQDN if not already listed in certs
|
||||
ansible.builtin.set_fact:
|
||||
certbot_certs: "{{ certbot_certs + [{'hostname': ansible_fqdn}] }}"
|
||||
certbot_certs: "{{ certbot_certs + [{'hostname': ansible_facts['fqdn']}] }}"
|
||||
when:
|
||||
- certbot_request_fqdn_cert
|
||||
- certbot_certs | selectattr('hostname', 'equalto', ansible_fqdn) | list | length == 0
|
||||
- certbot_certs | selectattr('hostname', 'equalto', ansible_facts['fqdn']) | list | length == 0
|
||||
|
||||
- name: Certbot - Request Certificate
|
||||
ansible.builtin.include_tasks: cert.yaml
|
||||
|
||||
Reference in New Issue
Block a user