From 4519688a950a1b44987b981a23014ebd725f5fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ne=C4=8Das?= Date: Tue, 16 Jul 2019 23:19:40 +0200 Subject: [PATCH] Ovirt add host retry doc backport (#58718) * add changelog * add docs about retry (#58625) --- changelogs/fragments/58625-ovirt_add_host_retry_doc.yml | 2 ++ lib/ansible/modules/cloud/ovirt/ovirt_host.py | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 changelogs/fragments/58625-ovirt_add_host_retry_doc.yml diff --git a/changelogs/fragments/58625-ovirt_add_host_retry_doc.yml b/changelogs/fragments/58625-ovirt_add_host_retry_doc.yml new file mode 100644 index 00000000000..645f8353264 --- /dev/null +++ b/changelogs/fragments/58625-ovirt_add_host_retry_doc.yml @@ -0,0 +1,2 @@ +bugfixes: + - ovirt add host retry example to documentation BZ(https://bugzilla.redhat.com/show_bug.cgi?id=1719271) diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_host.py b/lib/ansible/modules/cloud/ovirt/ovirt_host.py index 368e9f790f8..4c14e698b77 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_host.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_host.py @@ -232,6 +232,15 @@ EXAMPLES = ''' name: myhost force: True +# Retry removing host when failed (https://bugzilla.redhat.com/show_bug.cgi?id=1719271) +- ovirt_host: + state: absent + name: myhost + register: result + until: not result.failed + retries: 6 + delay: 20 + # Change host Name - ovirt_host: id: 00000000-0000-0000-0000-000000000000