Commit 36c3bb26 authored by Gardouille's avatar Gardouille

Pipe to flatten vars for apt module

parent 6097b162
......@@ -3,8 +3,7 @@
- name: Install required packages
apt:
name: '{{ apt__base_packages
+ apt__packages }}'
name: '{{ (apt__base_packages + apt__packages) | flatten }}'
state: 'present'
install_recommends: False
register: apt__register_packages
......
......@@ -5,7 +5,7 @@
- name: Install auth-related packages
apt:
name: '{{ auth_packages }}'
name: '{{ auth_packages | flatten }}'
state: 'present'
install_recommends: 'no'
register: auth__register_packages
......
......@@ -2,8 +2,7 @@
- name: Install requested packages
apt:
name: '{{ console_base_packages
+ console_conditional_packages }}'
name: '{{ (console_base_packages + console_conditional_packages) | flatten }}'
state: 'present'
install_recommends: False
register: console__register_packages
......
......@@ -2,8 +2,7 @@
- name: Install required packages
package:
name: '{{ etc_services__base_packages
+ etc_services__packages }}'
name: '{{ (etc_services__base_packages + etc_services__packages) | flatten }}'
state: 'present'
register: etc_services__register_packages
until: etc_services__register_packages is succeeded
......
......@@ -2,8 +2,7 @@
- name: Install required packages
apt:
name: '{{ logrotate__base_packages
+ logrotate__packages }}'
name: '{{ (logrotate__base_packages + logrotate__packages) | flatten }}'
state: 'present'
install_recommends: False
register: logrotate__register_packages
......
......@@ -12,7 +12,7 @@
- name: Purge other SMTP servers
apt:
name: '{{ nullmailer__purge_mta_packages }}'
name: '{{ nullmailer__purge_mta_packages | flatten }}'
state: 'absent'
purge: True
when: (nullmailer__deploy_state|d('present') != 'absent' and
......
......@@ -22,10 +22,10 @@
# Install PKI packages [[[
- name: Install PKI packages
apt:
name: '{{ pki_base_packages
+ pki_acme_packages
if (pki_acme|bool or pki_acme_install|bool) else []
+ pki_packages }}'
name: '{{ (pki_base_packages
+ (pki_acme_packages if (pki_acme|bool or pki_acme_install|bool) else [])
+ pki_packages)
| flatten }}'
state: 'present'
install_recommends: False
cache_valid_time: '{{ ansible_local.core.cache_valid_time
......
......@@ -2,9 +2,10 @@
- name: Install Postfix APT packages
apt:
name: '{{ postfix__base_packages
+ postfix__dependent_packages
+ postfix__packages }}'
name: '{{ (postfix__base_packages
+ postfix__dependent_packages
+ postfix__packages)
| flatten }}'
state: 'present'
install_recommends: False
register: postfix__register_packages
......@@ -14,7 +15,7 @@
- name: Purge other SMTP servers
apt:
name: '{{ postfix__purge_packages }}'
name: '{{ postfix__purge_packages | flatten }}'
state: 'absent'
purge: True
when: postfix__purge_packages|d() and ansible_pkg_mgr == 'apt'
......
......@@ -2,10 +2,10 @@
- name: Install required packages
apt:
name: '{{ rsyslog__base_packages
+ rsyslog__tls_packages
if (rsyslog__pki|bool) else []
+ rsyslog__packages }}'
name: '{{ (rsyslog__base_packages
+ (rsyslog__tls_packages if (rsyslog__pki|bool) else [])
+ rsyslog__packages)
| flatten }}'
state: 'present'
install_recommends: False
register: rsyslog__register_packages
......
......@@ -60,11 +60,12 @@
- name: Ensure OpenSSH support is installed
apt:
name: '{{ sshd__base_packages
+ sshd__recommended_packages
+ sshd__optional_packages
+ sshd__ldap_packages
+ sshd__packages }}'
name: '{{ (sshd__base_packages
+ sshd__recommended_packages
+ sshd__optional_packages
+ sshd__ldap_packages
+ sshd__packages)
| flatten }}'
state: '{{ "present"
if (ansible_local|d() and ansible_local.sshd|d())
else "latest" }}'
......
......@@ -2,8 +2,9 @@
- name: Install required packages
apt:
name: '{{ unattended_upgrades__base_packages
+ unattended_upgrades__packages }}'
name: '{{ (unattended_upgrades__base_packages
+ unattended_upgrades__packages)
| flatten }}'
state: 'present'
install_recommends: False
register: unattended_upgrades__register_packages
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment