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