Use flatten to manage packages list

This commit is contained in:
Jeremy Gardais 2023-01-24 11:14:26 +01:00
parent a2c7412cfe
commit c651541614
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
2 changed files with 5 additions and 3 deletions

View File

@ -1,3 +1,7 @@
## v1.0.1
### Fix
* Use flatten to manage packages list.
## v1.0.0 ## v1.0.0

View File

@ -6,11 +6,9 @@
# Manage base system packages [[[1 # Manage base system packages [[[1
- name: Ensure base packages are in there desired state - name: Ensure base packages are in there desired state
package: package:
name: '{{ item }}' name: '{{ netdata__base_packages | flatten }}'
state: '{{ "present" if (netdata__deploy_state == "present") else "absent" }}' state: '{{ "present" if (netdata__deploy_state == "present") else "absent" }}'
install_recommends: '{{ netdata__install_recommends | bool }}' install_recommends: '{{ netdata__install_recommends | bool }}'
with_flattened:
- '{{ netdata__base_packages | to_nice_json }}'
register: pkg_result register: pkg_result
until: pkg_result is success until: pkg_result is success