mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2025-04-19 17:01:37 +02:00
Add a retry to the "Install Certbot." task which can fail if there is another process that has locked the package updater (e.g. `install 'certbot'' failed: E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 11425 (unattended-upgr)`)
12 lines
275 B
YAML
12 lines
275 B
YAML
---
|
|
- name: Install Certbot.
|
|
package: "name={{ certbot_package }} state=present"
|
|
register: certbot_installed_ok
|
|
delay: 5
|
|
retries: 5
|
|
until: certbot_installed_ok is success
|
|
|
|
- name: Set Certbot script variable.
|
|
set_fact:
|
|
certbot_script: "{{ certbot_package }}"
|