From 4852473911d8d340a7100d20d4377660fc9fd7b0 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sun, 14 Jul 2024 12:14:55 +0200 Subject: [PATCH] [PR #8556/9f3103e8 backport][stable-8] Add example to rpm_ostree_pkg (#8619) Add example to rpm_ostree_pkg (#8556) * Update rpm_ostree_pkg.py expand examples list with 'until' example * Apply suggestions from code review. --------- Co-authored-by: Felix Fontein (cherry picked from commit 9f3103e89176726413e0911605d4919ef6097fb6) Co-authored-by: Daskan --- plugins/modules/rpm_ostree_pkg.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/modules/rpm_ostree_pkg.py b/plugins/modules/rpm_ostree_pkg.py index 826c33f2d1..1a02b2d71c 100644 --- a/plugins/modules/rpm_ostree_pkg.py +++ b/plugins/modules/rpm_ostree_pkg.py @@ -55,6 +55,17 @@ EXAMPLES = r''' community.general.rpm_ostree_pkg: name: nfs-utils state: absent + +# In case a different transaction is currently running the module would fail. +# Adding a delay can help mitigate this problem: +- name: Install overlay package + community.general.rpm_ostree_pkg: + name: nfs-utils + state: present + register: rpm_ostree_pkg + until: rpm_ostree_pkg is not failed + retries: 10 + dealy: 30 ''' RETURN = r'''