mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2025-04-19 17:01:37 +02:00
Adding route53 dns as default challenge
This commit is contained in:
parent
5ac9b8da7c
commit
e5f663e5b3
@ -10,8 +10,8 @@ env:
|
|||||||
- MOLECULE_DISTRO: centos7
|
- MOLECULE_DISTRO: centos7
|
||||||
- MOLECULE_DISTRO: centos6
|
- MOLECULE_DISTRO: centos6
|
||||||
MOLECULE_PLAYBOOK: playbook-source-install.yml
|
MOLECULE_PLAYBOOK: playbook-source-install.yml
|
||||||
|
- MOLECULE_DISTRO: ubuntu2004
|
||||||
- MOLECULE_DISTRO: ubuntu1804
|
- MOLECULE_DISTRO: ubuntu1804
|
||||||
- MOLECULE_DISTRO: ubuntu1604
|
|
||||||
- MOLECULE_DISTRO: debian10
|
- MOLECULE_DISTRO: debian10
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
---
|
---
|
||||||
# Certbot auto-renew cron job configuration (for certificate renewals).
|
# Certbot auto-renew cron job configuration (for certificate renewals).
|
||||||
|
certbot_test: false
|
||||||
certbot_auto_renew: true
|
certbot_auto_renew: true
|
||||||
certbot_auto_renew_user: "{{ ansible_user | default(lookup('env', 'USER')) }}"
|
certbot_auto_renew_user: "{{ ansible_user | default(lookup('env', 'USER')) }}"
|
||||||
certbot_auto_renew_hour: "3"
|
certbot_auto_renew_hour: "3"
|
||||||
certbot_auto_renew_minute: "30"
|
certbot_auto_renew_minute: "30"
|
||||||
certbot_auto_renew_options: "--quiet --no-self-upgrade"
|
certbot_auto_renew_options: >-
|
||||||
|
--quiet --no-self-upgrade --dns-route53 {%if certbot_test%}--test{%endif%}
|
||||||
|
|
||||||
# Parameters used when creating new Certbot certs.
|
# Parameters used when creating new Certbot certs.
|
||||||
certbot_create_if_missing: false
|
certbot_create_if_missing: false
|
||||||
@ -18,9 +20,9 @@ certbot_certs: []
|
|||||||
# - domains:
|
# - domains:
|
||||||
# - example3.com
|
# - example3.com
|
||||||
certbot_create_command: >-
|
certbot_create_command: >-
|
||||||
{{ certbot_script }} certonly --standalone --noninteractive --agree-tos
|
{{ certbot_script }} certonly --noninteractive --agree-tos
|
||||||
--email {{ cert_item.email | default(certbot_admin_email) }}
|
--email {{ cert_item.email | default(certbot_admin_email) }} --dns-route53
|
||||||
-d {{ cert_item.domains | join(',') }}
|
-d {{ cert_item.domains | join(",") }} {%if certbot_test%}--test{%endif%}
|
||||||
|
|
||||||
certbot_create_standalone_stop_services:
|
certbot_create_standalone_stop_services:
|
||||||
- nginx
|
- nginx
|
||||||
|
@ -1,9 +1,15 @@
|
|||||||
---
|
---
|
||||||
dependencies: []
|
dependencies:
|
||||||
|
- role: geerlingguy.pip
|
||||||
|
vars:
|
||||||
|
pip_install_packages:
|
||||||
|
- name: awscli
|
||||||
|
|
||||||
|
allow_duplicates: true
|
||||||
|
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
role_name: certbot
|
role_name: certbot
|
||||||
author: geerlingguy
|
author: thiagoalmeidasa
|
||||||
description: "Installs and configures Certbot (for Let's Encrypt)."
|
description: "Installs and configures Certbot (for Let's Encrypt)."
|
||||||
company: "Midwestern Mac, LLC"
|
company: "Midwestern Mac, LLC"
|
||||||
license: "license (BSD, MIT)"
|
license: "license (BSD, MIT)"
|
||||||
@ -33,3 +39,5 @@ galaxy_info:
|
|||||||
- certificates
|
- certificates
|
||||||
- ssl
|
- ssl
|
||||||
- https
|
- https
|
||||||
|
- awscli
|
||||||
|
- route53
|
||||||
|
@ -5,22 +5,29 @@
|
|||||||
|
|
||||||
vars:
|
vars:
|
||||||
certbot_auto_renew_user: root
|
certbot_auto_renew_user: root
|
||||||
|
certbot_test: true
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: Update apt cache.
|
- name: Update apt cache.
|
||||||
apt: update_cache=yes cache_valid_time=600
|
apt:
|
||||||
|
update_cache: true
|
||||||
|
cache_valid_time: 600
|
||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Install dependencies (RedHat).
|
- name: Install dependencies (RedHat).
|
||||||
yum: name={{ item }} state=present
|
yum:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
when: ansible_os_family == 'RedHat'
|
when: ansible_os_family == 'RedHat'
|
||||||
with_items:
|
with_items:
|
||||||
- cronie
|
- cronie
|
||||||
- epel-release
|
- epel-release
|
||||||
|
|
||||||
- name: Install cron (Debian).
|
- name: Install cron (Debian).
|
||||||
apt: name=cron state=present
|
apt:
|
||||||
|
name: cron
|
||||||
|
state: present
|
||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
---
|
---
|
||||||
|
- src: geerlingguy.pip
|
||||||
- src: geerlingguy.git
|
- src: geerlingguy.git
|
||||||
- src: geerlingguy.nginx
|
- src: geerlingguy.nginx
|
||||||
|
@ -7,6 +7,12 @@
|
|||||||
update: "{{ certbot_keep_updated }}"
|
update: "{{ certbot_keep_updated }}"
|
||||||
force: true
|
force: true
|
||||||
|
|
||||||
|
- name: Install Certbot route53 plugin.
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- python3-certbot-dns-route53
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Set Certbot script variable.
|
- name: Set Certbot script variable.
|
||||||
set_fact:
|
set_fact:
|
||||||
certbot_script: "{{ certbot_dir }}/certbot-auto"
|
certbot_script: "{{ certbot_dir }}/certbot-auto"
|
||||||
|
@ -1,6 +1,14 @@
|
|||||||
---
|
---
|
||||||
- name: Install Certbot.
|
- name: Install Certbot.
|
||||||
package: "name={{ certbot_package }} state=present"
|
package:
|
||||||
|
name: "{{ certbot_package }}"
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Install Certbot route53 plugin.
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- python3-certbot-dns-route53
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Set Certbot script variable.
|
- name: Set Certbot script variable.
|
||||||
set_fact:
|
set_fact:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user