Use flatten filter to install packages
This commit is contained in:
parent
19fc82668b
commit
c0f4da8a73
|
@ -1,3 +1,7 @@
|
||||||
|
## v1.0.2
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
* Use flatten to manage packages list.
|
||||||
|
|
||||||
## v1.0.1
|
## v1.0.1
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# List of base packages to install.
|
# List of base packages to install.
|
||||||
deb_sec__required_packages:
|
deb_sec__required_packages:
|
||||||
- 'debsecan'
|
- debsecan
|
||||||
# ]]]
|
# ]]]
|
||||||
# .. envvar:: deb_sec__deploy_state [[[
|
# .. envvar:: deb_sec__deploy_state [[[
|
||||||
#
|
#
|
||||||
|
|
|
@ -6,12 +6,10 @@
|
||||||
# Manage required system packages [[[1
|
# 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: '{{ (deb_sec__required_packages | flatten) }}'
|
||||||
state: '{{ "present" if (deb_sec__deploy_state == "present")
|
state: '{{ "present" if (deb_sec__deploy_state == "present")
|
||||||
else "absent" }}'
|
else "absent" }}'
|
||||||
install_recommends: False
|
install_recommends: False
|
||||||
with_flattened:
|
|
||||||
- '{{ deb_sec__required_packages | to_nice_json }}'
|
|
||||||
register: pkg_result
|
register: pkg_result
|
||||||
until: pkg_result is success
|
until: pkg_result is success
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue