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