mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2025-11-21 06:21:05 +01:00
Compare commits
4 Commits
d39a5a8228
...
cd9ba090f6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd9ba090f6 | ||
|
|
f8e02e1e83 | ||
|
|
9dcabdc972 | ||
|
|
b9415db0f0 |
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -26,7 +26,7 @@ jobs:
|
|||||||
- name: Set up Python 3.
|
- name: Set up Python 3.
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: '3.13' # Can't go to 3.14+ until Ansible 13.x
|
||||||
|
|
||||||
- name: Install test dependencies.
|
- name: Install test dependencies.
|
||||||
run: pip3 install yamllint
|
run: pip3 install yamllint
|
||||||
@ -64,7 +64,7 @@ jobs:
|
|||||||
- name: Set up Python 3.
|
- name: Set up Python 3.
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: '3.13' # Can't go to 3.14+ until Ansible 13.x
|
||||||
|
|
||||||
- name: Install test dependencies.
|
- name: Install test dependencies.
|
||||||
run: pip3 install ansible molecule molecule-plugins[docker] docker
|
run: pip3 install ansible molecule molecule-plugins[docker] docker
|
||||||
|
|||||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -29,7 +29,7 @@ jobs:
|
|||||||
- name: Set up Python 3.
|
- name: Set up Python 3.
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: '3.13' # Can't go to 3.14+ until Ansible 13.x
|
||||||
|
|
||||||
- name: Install Ansible.
|
- name: Install Ansible.
|
||||||
run: pip3 install ansible-core
|
run: pip3 install ansible-core
|
||||||
|
|||||||
@ -9,6 +9,12 @@ certbot_auto_renew_options: "--quiet"
|
|||||||
certbot_testmode: false
|
certbot_testmode: false
|
||||||
certbot_hsts: false
|
certbot_hsts: false
|
||||||
|
|
||||||
|
certbot_renewal_hook_post: ""
|
||||||
|
certbot_renewal_hook_pre: ""
|
||||||
|
certbot_renewal_hook_deploy: ""
|
||||||
|
certbot_renewal_hook_post_filename: "post.sh"
|
||||||
|
certbot_renewal_hook_pre_filename: "pre.sh"
|
||||||
|
certbot_renewal_hook_deploy_filename: "deploy.sh"
|
||||||
|
|
||||||
# Parameters used when creating new Certbot certs.
|
# Parameters used when creating new Certbot certs.
|
||||||
certbot_create_if_missing: false
|
certbot_create_if_missing: false
|
||||||
|
|||||||
@ -29,5 +29,7 @@
|
|||||||
loop_control:
|
loop_control:
|
||||||
loop_var: cert_item
|
loop_var: cert_item
|
||||||
|
|
||||||
|
- import_tasks: setup-hooks.yml
|
||||||
|
|
||||||
- import_tasks: renew-cron.yml
|
- import_tasks: renew-cron.yml
|
||||||
when: certbot_auto_renew
|
when: certbot_auto_renew
|
||||||
|
|||||||
30
tasks/setup-hooks.yml
Normal file
30
tasks/setup-hooks.yml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
- name: Ensure renewal hook directories exist
|
||||||
|
file:
|
||||||
|
path: "/etc/letsencrypt/renewal-hooks/{{ item }}"
|
||||||
|
state: directory
|
||||||
|
with_items:
|
||||||
|
- post
|
||||||
|
- pre
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
- name: Create post-renewal hook
|
||||||
|
copy:
|
||||||
|
content: "{{ certbot_renewal_hook_post }}"
|
||||||
|
dest: "/etc/letsencrypt/renewal-hooks/post/{{ certbot_renewal_hook_post_filename }}"
|
||||||
|
mode: "0755"
|
||||||
|
when: certbot_renewal_hook_post != ""
|
||||||
|
|
||||||
|
- name: Create pre-renewal hook
|
||||||
|
copy:
|
||||||
|
content: "{{ certbot_renewal_hook_pre }}"
|
||||||
|
dest: "/etc/letsencrypt/renewal-hooks/pre/{{ certbot_renewal_hook_pre_filename }}"
|
||||||
|
mode: "0755"
|
||||||
|
when: certbot_renewal_hook_pre != ""
|
||||||
|
|
||||||
|
- name: Create deploy-renewal hook
|
||||||
|
copy:
|
||||||
|
content: "{{ certbot_renewal_hook_deploy }}"
|
||||||
|
dest: "/etc/letsencrypt/renewal-hooks/deploy/{{ certbot_renewal_hook_deploy_filename }}"
|
||||||
|
mode: "0755"
|
||||||
|
when: certbot_renewal_hook_deploy != ""
|
||||||
Loading…
x
Reference in New Issue
Block a user