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

Commit

Permalink
fix: Update retry logic for certain ansible tasks.
Browse files Browse the repository at this point in the history
When we added retry logic, we missed that we also needed
to register a variable and add an until condition to ensure
that retries happen. This should ensure that this matches.

edx/edx-arch-experiments#359
  • Loading branch information
dianakhuang committed Aug 4, 2023
1 parent 898d89b commit bee7eaa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions playbooks/roles/insightvm_agent/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
path: /etc/systemd/system/ir_agent.service
register: r7_service
retries: 3
until: r7_service is succeeded
tags:
- manage_rapid7_check_agent

Expand Down
2 changes: 2 additions & 0 deletions playbooks/roles/security/tasks/security-amazon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
- name: "Take security updates during ansible runs"
command: "{{ item }}"
when: SECURITY_UPGRADE_ON_ANSIBLE
register: result_amazon
retries: 3
until: result_amazon is succeeded
with_items:
- yum check-update --security
- yum update --security -y
2 changes: 2 additions & 0 deletions playbooks/roles/security/tasks/security-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
- name: Disable unattended-upgrades if Xenial (16.04)
command: "{{ item }}"
when: ansible_distribution_release == 'xenial' and not SECURITY_UNATTENDED_UPGRADES
register: result_ubuntu
retries: 3
until: result_ubuntu is succeeded
with_items:
- "systemctl disable apt-daily.service"
- "systemctl disable apt-daily.timer"
Expand Down

0 comments on commit bee7eaa

Please sign in to comment.