ansible-role-certbot/tasks/install-with-package.yml
Chris Hills @ Brsk Limited (GB) 3a34f2da8e
Update install-with-package.yml
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)`)
2023-12-06 09:26:24 +00:00

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 }}"