Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix certbot reload #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

- name: Restart certbot
systemd:
- name: Enable certbot
ansible.builtin.systemd:
name: certbot-renew.timer
state: restarted
enabled: true
daemon_reload: true
7 changes: 3 additions & 4 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ galaxy_info:
company: ELAN e.V.
description: Configure TLS certificate renewal via certbot for Opencast
license: BSD-3-Clause
min_ansible_version: 2.9
min_ansible_version: "2.9"
galaxy_tags:
- opencast
platforms:
- name: EL
versions:
- 7
- 8
- 9
- "8"
- "9"
- name: Debian
versions:
- all
Expand Down
15 changes: 9 additions & 6 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@
ansible.builtin.package:
name: certbot

- name: Install certbot services
ansible.builtin.template:
src: '{{ item }}'
dest: /etc/systemd/system/{{ item }}
mode: '0644'
# This task should remove custom service definitions created by previous version of this role.
# Certbot package come with a renew service definitions itself, why not using it?
# It will renew all registred certificates by default and does not limit us on some domains.
# You can remove this task on later versions.
- name: Remove custom certbot services definition
ansible.builtin.file:
path: '/etc/systemd/system/{{ item }}'
state: absent
loop:
- certbot-renew.service
- certbot-renew.timer
notify: Restart certbot
notify: Enable certbot

- name: Start certbot service
ansible.builtin.service:
Expand Down
7 changes: 0 additions & 7 deletions templates/certbot-renew.service

This file was deleted.

8 changes: 0 additions & 8 deletions templates/certbot-renew.timer

This file was deleted.

Loading