Add role for deploying certbot and setting up certificate using it
This commit is contained in:
parent
1b45e94960
commit
5341f9dfba
7 changed files with 104 additions and 0 deletions
19
playbooks/roles/certbot/tasks/main/install.yaml
Normal file
19
playbooks/roles/certbot/tasks/main/install.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
- name: make sure the `openssl` package is installed
|
||||
ansible.builtin.apt:
|
||||
name: openssl
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: make sure the `certbot` package is installed
|
||||
ansible.builtin.apt:
|
||||
name: certbot={{ certbot__version_spec }}*
|
||||
state: present
|
||||
allow_change_held_packages: true
|
||||
update_cache: true
|
||||
become: true
|
||||
|
||||
- name: apt-mark hold `certbot`
|
||||
ansible.builtin.dpkg_selections:
|
||||
name: certbot
|
||||
selection: hold
|
||||
become: true
|
Loading…
Add table
Add a link
Reference in a new issue