ansible/roles/rsyslog/templates/rsyslog.conf.j2

83 lines
2.2 KiB
Plaintext
Raw Normal View History

2019-11-03 17:31:08 +00:00
# {{ ansible_managed }}
{% for module in rsyslog_load_modules | default([]) %}
{% if module.enabled | default(true) %}
module(
load="{{ module.name }}"
{% if module.params is defined and module.params is mapping %}
{% for k, v in module.params.items() | default({}) %}
{{ k }}="{{ v }}"
{% endfor %}
{% endif %}
)
{% endif %}
{% endfor %}
2019-12-19 04:08:03 +00:00
{% for input in rsyslog_inputs | default([]) %}
{% if input.enabled | default(true) %}
input(
type="{{ input.name }}"
{% if input.params is defined and input.params is mapping %}
{% for k, v in input.params.items() | default({}) %}
{{ k }}="{{ v }}"
{% endfor %}
{% endif %}
)
{% endif %}
{% endfor %}
{% for output in rsyslog_outputs | default([]) %}
{% if output.enabled | default(true) %}
action(
type="{{ output.name }}"
{% if output.params is defined and output.params is mapping %}
{% for k, v in output.params.items() | default({}) %}
{{ k }}="{{ v }}"
{% endfor %}
{% endif %}
)
{% endif %}
{% endfor %}
2019-11-03 17:31:08 +00:00
{% if rsyslog_action_file_default_template is defined %}
$ActionFileDefaultTemplate {{ rsyslog_action_file_default_template }}
{% endif %}
{% if rsyslog_repeated_msg_reduction is defined %}
$RepeatedMsgReduction {{ rsyslog_repeated_msg_reduction }}
{% endif %}
{% if rsyslog_file_owner is defined %}
$FileOwner {{ rsyslog_file_owner }}
{% endif %}
{% if rsyslog_file_group is defined %}
$FileGroup {{ rsyslog_file_group }}
{% endif %}
{% if rsyslog_dir_owner is defined %}
2019-12-04 02:14:33 +00:00
$DirOwner {{ rsyslog_dir_owner }}
{% endif %}
{% if rsyslog_dir_group is defined %}
2019-12-04 02:14:33 +00:00
$DirGroup {{ rsyslog_dir_group }}
{% endif %}
2019-11-03 17:31:08 +00:00
{% if rsyslog_file_create_mode is defined %}
$FileCreateMode {{ rsyslog_file_create_mode }}
{% endif %}
{% if rsyslog_create_dirs is defined %}
2019-12-04 02:14:33 +00:00
$CreateDirs {{ rsyslog_create_dirs | ternary('on', 'off') }}
{% endif %}
2019-11-03 17:31:08 +00:00
{% if rsyslog_dir_create_mode is defined %}
$DirCreateMode {{ rsyslog_dir_create_mode }}
{% endif %}
{% if rsyslog_umask is defined %}
$Umask {{ rsyslog_umask }}
{% endif %}
{% if rsyslog_priv_drop_to_user is defined %}
$PrivDropToUser {{ rsyslog_priv_drop_to_user }}
{% endif %}
{% if rsyslog_priv_drop_to_group is defined %}
$PrivDropToGroup {{ rsyslog_priv_drop_to_group }}
{% endif %}
$WorkDirectory {{ rsyslog_work_directory }}
$IncludeConfig {{ rsyslog_include_config }}