Closed ct-sce closed 2 years ago
Thanks for the input!
If the packages differ per distribution, I think it would be nice to make a map in vars/main.yml
and select packages based on the ansible_os_family
(or ansible_distribution
) and the "feature" like "gnutls". Something like this:
defaults/main.yml
# Set rsyslog_feature to "default" or "gnutls".
rsyslog_feature: default
vars/main.yml
_rsyslog_packages:
RedHat:
default:
- x
gnutls:
- x
- y
Debian
default:
- z
gnutls:
- z
- x
rsyslog_packages: "{{ _rsyslog_packages[ansible_os_family][rsyslog_feature] }}"
I think you are more familiar with rsyslog, so please let me know if my remarks make any sense.
rsyslog packages seems to be identical between distributions so maybe we can do
rsyslog_features:
- gnutls
- elastisearch
and add a task
- apt:
name: "rsyslog-{{ item }}"
loop: "{{ rsyslog_features }}"
this way we can install every feature we want to add
That's good proposal:
Please modify the PR a bit to your proposed solution.
Regards, Robert de Bock.
@robertdebock the PR is now updated with the proposal
Regards, Seb
name: Allow overriding rsyslog_packages about: Allow overriding rsyslog_packages
Describe the change Allow overriding rsyslog_packages Exemple install rsyslog-gnutls or any other output or protocol support plugin