dotfiles/roles/certbot/tasks/main.yml
Matej Focko 8454780c92
feat(porkbun): switch to global variables for keys
- Introduce 2 global variables with API keys
- Remove redundant role that only installs one config file used by
  another role
- Use the said global variables within DDNS and Certbot roles
- Create the config file in the role that uses it (Certbot)

Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-12 16:46:34 +01:00

41 lines
1,000 B
YAML

---
- name: Packages
ansible.builtin.include_tasks: install.yml
tags: install
- name: Install the CLI configuration for Certbot
ansible.builtin.template:
src: templates/cli.ini
dest: /etc/letsencrypt/cli.ini
mode: 0600
owner: root
group: root
- name: Create the file with Porkbun secrets
ansible.builtin.template:
src: templates/porkbun.ini
dest: /etc/porkbun.ini
mode: 0600
- name: Install the Porkbun Certbot container definition (quadlet)
ansible.builtin.template:
src: templates/certbot.container
dest: /etc/containers/systemd/certbot.container
mode: 0644
owner: root
group: root
- name: Install the timer for the Certbot quadlet
ansible.builtin.template:
src: templates/certbot.timer
dest: /etc/systemd/system/certbot.timer
mode: 0644
owner: root
group: root
- name: Enable the timer
ansible.builtin.systemd_service:
daemon_reload: true
enabled: true
name: certbot.timer
state: "started"