ansible-roles/evoacme/tasks/certbot.yml
Jérémy Lecour bee57a0b3c
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/pr Build is failing
change distribution release codename
Ansible 2.2 is too old to know about buster.
Let's use LSB for that.
2019-06-18 17:35:28 +02:00

48 lines
1.1 KiB
YAML

---
- block:
- name: install jessie-backports
include_role:
name: apt
tasks_from: backports.yml
- name: Add exceptions for certbot dependencies
copy:
src: backports-certbot
dest: /etc/apt/preferences.d/z-backports-certbot
notify: apt update
- meta: flush_handlers
when: ansible_lsb.codename == "jessie"
- name: Install certbot with apt
apt:
name: certbot
state: latest
- include_role:
name: remount-usr
- name: Remove certbot symlink for apt install
file:
path: /usr/local/bin/certbot
state: absent
- name: Disable /etc/cron.d/certbot
command: mv /etc/cron.d/certbot /etc/cron.d/certbot.disabled
args:
removes: /etc/cron.d/certbot
creates: /etc/cron.d/certbot.disabled
- name: Disable /etc/cron.daily/certbot
command: mv /etc/cron.daily/certbot /etc/cron.daily/certbot.disabled
args:
removes: /etc/cron.daily/certbot
creates: /etc/cron.daily/certbot.disabled
- name: Install evoacme custom cron
copy:
src: evoacme.cron
dest: /etc/cron.daily/evoacme
mode: "0755"