From 7ace36ed6e1d6a651da6f075df71df82a6f5ff17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Wed, 27 Feb 2019 13:31:25 +0100 Subject: [PATCH] Fix E405 Remote package tasks should have a retry --- CHANGELOG.md | 1 + tasks/main.yml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5657b0b..a068f47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Set empty dependencies line to fix Galaxy warning. * Add possibility to restart Fail2ban service. * Use to_nice_json to manage packages list. +* Fix E405 Remote package tasks should have a retry. ## v1.4.0 diff --git a/tasks/main.yml b/tasks/main.yml index 0d167d0..9d6ae82 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -15,6 +15,8 @@ state: '{{ nft_pkg_state }}' with_items: - '{{ nft_pkg_list | to_nice_json }}' + register: pkg_install_result + until: pkg_install_result is success when: nft_enabled|bool - name: INSTALL Remove iptables packages @@ -23,6 +25,8 @@ state: '{{ nft_old_pkg_state }}' with_items: - '{{ nft_old_pkg_list | to_nice_json }}' + register: pkg_remove_result + until: pkg_remove_result is success when: (nft_enabled|bool and nft_old_pkg_manage|bool)