Skip to content

Commit

Permalink
fix: Patches for prevailing Ansible
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Christie committed Aug 22, 2024
1 parent 0536e5a commit dbfb1eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions roles/check-no-rofs/tasks/check-volume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# (it may have been removed dur to redeployment)

- name: Check Pod exists
kubernetes.core.k8s_info:
k8s_info:
kind: Pod
namespace: "{{ item.namespace }}"
name: "{{ item.pod }}"
Expand All @@ -23,15 +23,15 @@
block:

- name: Touch target file
kubernetes.core.k8s_exec:
k8s_exec:
namespace: "{{ item.namespace }}"
pod: "{{ item.pod }}"
command: touch {{ item.volume }}/blob.txt
register: command_status
ignore_errors: True

Check failure on line 31 in roles/check-no-rofs/tasks/check-volume.yaml

View workflow job for this annotation

GitHub Actions / build (3.11)

31:20 [truthy] truthy value should be one of [false, no, true, yes]

Check failure on line 31 in roles/check-no-rofs/tasks/check-volume.yaml

View workflow job for this annotation

GitHub Actions / build (3.11)

31:20 [truthy] truthy value should be one of [false, no, true, yes]

- name: Delete failed pod
kubernetes.core.k8s:
k8s:
api_version: v1
kind: Pod
namespace: "{{ item.namespace }}"
Expand All @@ -49,7 +49,7 @@
- command_status.rc is not defined or command_status.rc != 0

- name: Remove target file
kubernetes.core.k8s_exec:
k8s_exec:
namespace: "{{item.namespace }}"
pod: "{{ item.pod }}"
command: rm {{ item.volume }}/blob.txt
Expand Down
3 changes: 1 addition & 2 deletions roles/check-no-rofs/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
failed_volumes: []

- name: Check volume
include_tasks: check-volume.yaml
import_tasks: check-volume.yaml
loop: "{{ volumes[cluster] }}"
no_log: True

- name: Handle failed volumes
block:
Expand Down

0 comments on commit dbfb1eb

Please sign in to comment.