From a8141ae39b72f6af0d23ab39a2166a0b801f6a3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Thu, 13 Sep 2018 10:02:07 +0200 Subject: [PATCH] Don't remove dependent packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They might be really wanted on some system (eg. hdparm, dmidecode,…). --- CHANGELOG.md | 1 + README.md | 1 + tasks/main.yml | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73e74e8..dd0eb66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features * Install dependent packages for fusioninventory-agent. +* Don't remove dependent packages. * Install fusioninventory-agent package from URL. * Generate agent's configuration file. * Restart agent's service if needed. diff --git a/README.md b/README.md index 2761ca2..bd71db5 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ A role to manage FusionInventory agent installation and configuration. This role will : * Install needed dependent packages of fusioninventory-agent. +* Once installed, the dependencies will not be removed. * Install fusioninventory-agent package from official project package/URL. * Generate agent's configuration file. * Manage agent's systemd service. diff --git a/tasks/main.yml b/tasks/main.yml index e688ab3..0b39623 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -4,12 +4,13 @@ # tasks file for fusioninventory # Manage dependent packages [[[1 -- name: Ensure dependent packages are in there desired state +- name: Ensure dependent packages are installed package: name: '{{ item }}' - state: '{{ "present" if (fusioninventory__agent_deploy_state == "present") else "absent" }}' + state: 'present' with_flattened: - '{{ fusioninventory__agent_depend_packages }}' + when: fusioninventory__agent_deploy_state == "present" # Manage agent package [[[1 - name: Ensure fusioninventory-agent package from URL