From 9f3103e89176726413e0911605d4919ef6097fb6 Mon Sep 17 00:00:00 2001 From: Daskan Date: Sun, 14 Jul 2024 12:05:53 +0200 Subject: [PATCH] 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 --- 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'''