Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Commit

Permalink
Add retries to package installs (#88)
Browse files Browse the repository at this point in the history
* Add retry guard around package installs to avoid locking

Both YUM and APT consistently display temporary locking when building via packer and ansible

  * retry usually only fires once anecdotally

* Changing to make style consistent with other roles
  • Loading branch information
denmat authored and paulfantom committed May 31, 2019
1 parent 14a9fa2 commit e58660e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
package:
name: "{{ item }}"
state: present
register: _install_dep_packages
until: _install_dep_packages is success
retries: 5
delay: 2
with_items: "{{ node_exporter_dependencies }}"

- name: Create the node_exporter group
Expand Down

0 comments on commit e58660e

Please sign in to comment.