You've already forked ansible-role-rsyslog
Update variable names. Revert to almalinux
This commit is contained in:
@@ -7,6 +7,8 @@ Supported Platforms
|
||||
-------------------
|
||||
|
||||
* RHEL 5/6/7
|
||||
* Almalinux
|
||||
* Rocky Linux
|
||||
* Archlinux
|
||||
* Ubuntu Trusty/Xenial
|
||||
* Debian Wheezy
|
||||
@@ -31,8 +33,8 @@ and configuration can be overridden, for additional informations please have a l
|
||||
|
||||
**rsyslog_default_config**: Setup a default basic configuration stanza (default: "True")
|
||||
**purge_config**: Purge existing config snippets (default: "False")
|
||||
**use_repo**: Use Adiscon rsyslog official package repository (default: "False")
|
||||
**repo_releasever**: Default rsyslog major release repository version to use (default: 8)
|
||||
**rsyslog_use_repo**: Use Adiscon rsyslog official package repository (default: "False")
|
||||
**rsyslog_repo_releasever**: Default rsyslog major release repository version to use (default: 8)
|
||||
**rsyslog_action_file_template**: Define a custom template for file logging (default: RSYSLOG_TraditionalFileFormat)
|
||||
**rsyslog_priv_drop_to_user**: Drop root privileges and switch to given user (default: root)
|
||||
**rsyslog_priv_drop_to_group**: Drop root privileges and switch to given group (default: root)
|
||||
@@ -101,7 +103,7 @@ Example Playbook
|
||||
- hosts: all
|
||||
remote_user: root
|
||||
roles:
|
||||
- { role: rsyslog, "use_repo": True, "repo_releasever": 7 }
|
||||
- { role: rsyslog, "rsyslog_use_repo": True, "rsyslog_repo_releasever": 7 }
|
||||
```
|
||||
|
||||
5) Enable a simple rsyslog UDP server (receiver) for remote logging
|
||||
|
||||
@@ -11,11 +11,11 @@ rsyslog_action_file_default_template: RSYSLOG_TraditionalFileFormat
|
||||
rsyslog_action_file_template: False ## example value: "%rawmsg%\n"
|
||||
rsyslog_priv_drop_to_user: False ## example value: syslog
|
||||
rsyslog_priv_drop_to_group: False ## example value: syslog
|
||||
purge_config: False
|
||||
use_repo: False
|
||||
repo_releasever: 8
|
||||
items: []
|
||||
rsyslog_default_config: "True"
|
||||
rsyslog_purge_config: False
|
||||
rsyslog_use_repo: False
|
||||
rsyslog_repo_releasever: 8
|
||||
rsyslog_items: []
|
||||
rsyslog_default_config: True
|
||||
rsyslog_server_udp: False
|
||||
rsyslog_server_udp_name: "imudp"
|
||||
rsyslog_server_udp_port: "514"
|
||||
|
||||
@@ -5,7 +5,7 @@ driver:
|
||||
name: podman
|
||||
platforms:
|
||||
- name: instance
|
||||
image: "geerlingguy/docker-${MOLECULE_DISTRO:-rockylinux8}-ansible:latest"
|
||||
image: "docker.io/guisea/${MOLECULE_DISTRO:-almalinux8}:latest"
|
||||
command: ${MOLECULE_DOCKER_COMMAND:-""}
|
||||
tmpfs:
|
||||
- /run
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
# Install and configure rsyslog
|
||||
---
|
||||
- name: Debugger
|
||||
debug:
|
||||
msg: 'OS Family: {{ ansible_os_family }}'
|
||||
|
||||
- name: set OS dependent variables
|
||||
tags:
|
||||
- rsyslog
|
||||
@@ -16,15 +12,18 @@
|
||||
- "{{ ansible_os_family }}.yml"
|
||||
- default.yml
|
||||
|
||||
- include: main_rh.yml
|
||||
- name: Include Tasks for RHEL
|
||||
include_tasks: main_rh.yml
|
||||
when: >
|
||||
ansible_os_family == 'RedHat' or
|
||||
ansible_os_family == 'Rocky'
|
||||
|
||||
- include: main_deb.yml
|
||||
- name: Include Tasks for Debian/Ubuntu
|
||||
include_tasks: main_deb.yml
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- include: main_arch.yml
|
||||
- name: Include Tasks for Archlinux
|
||||
include_tasks: main_arch.yml
|
||||
when: ansible_os_family == 'Archlinux'
|
||||
|
||||
- name: setup main configuration
|
||||
@@ -48,7 +47,7 @@
|
||||
file:
|
||||
state: absent
|
||||
path: "{{ rsyslog_include_path }}/"
|
||||
when: purge_config
|
||||
when: rsyslog_purge_config
|
||||
|
||||
- name: create additional configuration directory
|
||||
tags:
|
||||
@@ -102,7 +101,7 @@
|
||||
group={{ rsyslog_file_group }}
|
||||
mode={{ rsyslog_file_mode }}
|
||||
with_items:
|
||||
- "{{ items }}"
|
||||
- "{{ rsyslog_items }}"
|
||||
notify:
|
||||
- restart rsyslog
|
||||
when: rsyslog_os_supported
|
||||
|
||||
@@ -9,5 +9,4 @@
|
||||
- packages
|
||||
pacman:
|
||||
pkg: '{{ rsyslog_package_names }}'
|
||||
state: installed
|
||||
with_items: '{{ rsyslog_package_names }}'
|
||||
state: installed
|
||||
@@ -12,7 +12,7 @@
|
||||
- name: Enable Adiscon rsyslog apt repo
|
||||
apt_repository: repo='deb http://debian.adiscon.com/v8-stable wheezy/' state=present filename='rsyslog' update_cache='yes'
|
||||
when: >
|
||||
use_repo and
|
||||
rsyslog_use_repo and
|
||||
ansible_distribution == 'Debian'
|
||||
|
||||
## TODO: v8-stable/v7-stable available, for "ubuntu versions not yet reached end of life".. sanitize selection
|
||||
@@ -20,7 +20,7 @@
|
||||
- name: Enable Adiscon rsyslog apt repo
|
||||
apt_repository: repo='ppa:adiscon/v{{ repo_releasever }}-stable'
|
||||
when: >
|
||||
use_repo and
|
||||
rsyslog_use_repo and
|
||||
ansible_distribution == 'Ubuntu'
|
||||
|
||||
- name: install packages for Debian
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
rpm_key: key=http://rpms.adiscon.com/RPM-GPG-KEY-Adiscon state=present
|
||||
when: >
|
||||
not adiscon_gpg_key.stat.exists and
|
||||
use_repo
|
||||
rsyslog_use_repo
|
||||
|
||||
- name: Enable Adiscon rsyslog yum repo
|
||||
tags:
|
||||
@@ -25,7 +25,7 @@
|
||||
src: rsyslog.yum.repo.j2
|
||||
dest: /etc/yum.repos.d/rsyslog.repo
|
||||
mode: 0644
|
||||
when: use_repo
|
||||
when: rsyslog_use_repo
|
||||
|
||||
- name: install packages for RHEL
|
||||
tags:
|
||||
|
||||
Reference in New Issue
Block a user