Replace with_flattened by flatten jinja filter

This commit is contained in:
Jeremy Gardais 2022-11-08 08:12:07 +01:00
parent c8025d6cd0
commit 3f2070368f
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 1 additions and 3 deletions

View File

@ -6,11 +6,9 @@
# Server Manage required system packages [[[1 # Server Manage required system packages [[[1
- name: Ensure required packages are in there desired state - name: Ensure required packages are in there desired state
package: package:
name: '{{ item }}' name: '{{ xymon_server__base_packages | flatten }}'
state: '{{ "present" if (xymon_server__deploy_state == "present") else "absent" }}' state: '{{ "present" if (xymon_server__deploy_state == "present") else "absent" }}'
install_recommends: False install_recommends: False
with_flattened:
- '{{ xymon_server__base_packages | to_nice_json }}'
register: server_pkg_result register: server_pkg_result
until: server_pkg_result is success until: server_pkg_result is success