mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2025-04-19 17:01:37 +02:00
include distribution specific vars from files
This commit is contained in:
parent
da5a6738d5
commit
1ca3e00b46
8
tasks/include-vars.yml
Normal file
8
tasks/include-vars.yml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
- name: Load a variable file based on the OS type, or a default if not found.
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- "{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml"
|
||||
- "{{ ansible_distribution }}.yml"
|
||||
- "{{ ansible_os_family }}.yml"
|
||||
- "default.yml"
|
@ -1,14 +1,4 @@
|
||||
---
|
||||
- name: Define certbot_package (Ubuntu 16.04).
|
||||
set_fact:
|
||||
certbot_package: letsencrypt
|
||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '16.04'
|
||||
|
||||
- name: Define certbot_package.
|
||||
set_fact:
|
||||
certbot_package: certbot
|
||||
when: certbot_package is undefined
|
||||
|
||||
- name: Install Certbot.
|
||||
package: "name={{ certbot_package }} state=present"
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
---
|
||||
- include: include-vars.yml
|
||||
|
||||
- include: install-with-package.yml
|
||||
when: not certbot_install_from_source
|
||||
|
||||
|
1
vars/Ubuntu-16.04.yml
Normal file
1
vars/Ubuntu-16.04.yml
Normal file
@ -0,0 +1 @@
|
||||
certbot_package: letsencrypt
|
2
vars/default.yml
Normal file
2
vars/default.yml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
certbot_package: certbot
|
Loading…
x
Reference in New Issue
Block a user