2
0
Fork 0

Flatten packages list to allow condition

This commit is contained in:
Jeremy Gardais 2021-06-22 15:56:25 +02:00
parent 2f30ef5954
commit 78b0528362
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,9 @@
## v1.3.1
### Enhancement
* Flatten packages list to allow condition.
## v1.3.0 ## v1.3.0
### Fix ### Fix

View File

@ -17,10 +17,8 @@
# Manage dependent packages [[[1 # Manage dependent packages [[[1
- name: Ensure dependent packages are installed - name: Ensure dependent packages are installed
package: package:
name: '{{ item }}' name: '{{ fusioninventory__agent_depend_packages | flatten }}'
state: 'present' state: 'present'
with_flattened:
- '{{ fusioninventory__agent_depend_packages | to_nice_json }}'
register: pkg_dep_result register: pkg_dep_result
until: pkg_dep_result is success until: pkg_dep_result is success
when: fusioninventory__agent_deploy_state == "present" when: fusioninventory__agent_deploy_state == "present"
@ -38,7 +36,7 @@
- name: Ensure fusioninventory-agent package from REPOS - name: Ensure fusioninventory-agent package from REPOS
package: package:
name: '{{ fusioninventory__agent_packages }}' name: '{{ fusioninventory__agent_packages | flatten }}'
state: '{{ "present" if (fusioninventory__agent_deploy_state == "present") state: '{{ "present" if (fusioninventory__agent_deploy_state == "present")
else "absent" }}' else "absent" }}'
register: pkg_agent_repo_result register: pkg_agent_repo_result