mirror of
https://github.com/nikdoof/ansible-certbot.git
synced 2025-12-13 07:32:15 +00:00
Compare commits
2 Commits
e0b88c6dad
...
af72c10791
| Author | SHA1 | Date | |
|---|---|---|---|
|
af72c10791
|
|||
|
2908e643c7
|
@@ -6,7 +6,11 @@
|
|||||||
|
|
||||||
- name: Certbot - Build plugin list
|
- name: Certbot - Build plugin list
|
||||||
set_fact:
|
set_fact:
|
||||||
_certbot_plugins_used: "{{ certbot_certs | map(attribute='plugin') | list | unique | map('format', certbot_plugins_package_prefix + '%s') | list }}"
|
_certbot_plugins_used: "{{ certbot_certs | map(attribute='plugin') | list | unique }}"
|
||||||
|
|
||||||
|
- name: Certbot - Map plugin names to package names
|
||||||
|
set_fact:
|
||||||
|
_certbot_plugins_used: "{{ [certbot_plugins_package_prefix] | product(_certbot_plugins_used) | map('join') | list }}"
|
||||||
|
|
||||||
- name: Certbot - Install extension packages
|
- name: Certbot - Install extension packages
|
||||||
when:
|
when:
|
||||||
@@ -31,4 +35,4 @@
|
|||||||
name: "{{ certbot_timer_service }}"
|
name: "{{ certbot_timer_service }}"
|
||||||
state: started
|
state: started
|
||||||
enabled: true
|
enabled: true
|
||||||
when: certbot_timer_service
|
when: certbot_timer_service is defined
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
- name: Certbot - Get OS specific vars
|
- name: Certbot - Get OS specific vars
|
||||||
include_vars: "{{ item }}"
|
include_vars: "{{ item }}"
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- "os/{{ ansible_os_family }}/{{ ansible_distribution_major_version }}.yaml"
|
- "os/{{ ansible_facts['os_family'] }}/{{ ansible_facts['distribution_major_version'] }}.yaml"
|
||||||
- "os/{{ ansible_os_family }}.yaml"
|
- "os/{{ ansible_facts['os_family'] }}.yaml"
|
||||||
|
|
||||||
- name: Certbot - Install Certbot
|
- name: Certbot - Install Certbot
|
||||||
ansible.builtin.import_tasks: install.yaml
|
ansible.builtin.import_tasks: install.yaml
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
---
|
---
|
||||||
- name: Certbot - Add host FQDN if not already listed in certs
|
- name: Certbot - Add host FQDN if not already listed in certs
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
certbot_certs: "{{ certbot_certs + [{'hostname': ansible_fqdn}] }}"
|
certbot_certs: "{{ certbot_certs + [{'hostname': ansible_facts['fqdn']}] }}"
|
||||||
when:
|
when:
|
||||||
- certbot_request_fqdn_cert
|
- 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
|
- name: Certbot - Request Certificate
|
||||||
ansible.builtin.include_tasks: cert.yaml
|
ansible.builtin.include_tasks: cert.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user