Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: delete kdump user last, retry until success #171

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions tests/tests_ssh_reboot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,6 @@
include_role:
name: linux-system-roles.kdump

- name: Delete user
user:
name: "{{ kdump_ssh_user }}"
state: absent

- name: Get the authorized_keys contents after
slurp:
src: "{{ __authorized_keys_file.stat.path }}"
Expand All @@ -151,3 +146,10 @@
- __ssh_dir_stat_before.stat.mode == __ssh_dir_stat_after.stat.mode
- __ssh_dir_stat_before.stat.uid == __ssh_dir_stat_after.stat.uid
- __ssh_dir_stat_before.stat.gid == __ssh_dir_stat_after.stat.gid

- name: Delete user
user:
name: "{{ kdump_ssh_user }}"
state: absent
register: __user_delete
until: __user_delete is success
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value for “retries” is 3 and “delay” is 5, is it enough here?
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_loops.html#retrying-a-task-until-a-condition-is-met

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so - the error is very difficult to reproduce in CI

Loading