You've already forked ansible-role-rsyslog
Add support for adiscon official package repository
This commit is contained in:
@@ -31,6 +31,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")
|
||||||
|
**repo_releasever**: Default rsyslog major release repository version to use (default: 8)
|
||||||
|
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ rsyslog_action_file_default_template: RSYSLOG_TraditionalFileFormat
|
|||||||
#rsyslog_priv_drop_to_user: syslog
|
#rsyslog_priv_drop_to_user: syslog
|
||||||
#rsyslog_priv_drop_to_group: syslog
|
#rsyslog_priv_drop_to_group: syslog
|
||||||
purge_config: False
|
purge_config: False
|
||||||
|
use_repo: False
|
||||||
|
repo_releasever: 8
|
||||||
items: []
|
items: []
|
||||||
rsyslog_default_config: "True"
|
rsyslog_default_config: "True"
|
||||||
rsyslog_os_supported: no
|
rsyslog_os_supported: no
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
# Install packages for Archlinux
|
|
||||||
---
|
|
||||||
- name: install packages for Archlinux
|
|
||||||
tags:
|
|
||||||
- rsyslog
|
|
||||||
- packages
|
|
||||||
pacman: pkg={{item}} state=installed
|
|
||||||
with_items: '{{ rsyslog_package_names }}'
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
# Install packages for Debian
|
|
||||||
---
|
|
||||||
- name: install packages for Debian
|
|
||||||
tags:
|
|
||||||
- rsyslog
|
|
||||||
- packages
|
|
||||||
apt: pkg={{item}} state=installed
|
|
||||||
with_items: '{{ rsyslog_package_names }}'
|
|
||||||
@@ -1,3 +1,11 @@
|
|||||||
# Archlinux related tasks
|
# Archlinux related tasks
|
||||||
---
|
---
|
||||||
- include: arch_packages.yml
|
|
||||||
|
## TODO maybe?: no official upstream packages/repo for Archlinux
|
||||||
|
|
||||||
|
- name: install packages for Archlinux
|
||||||
|
tags:
|
||||||
|
- rsyslog
|
||||||
|
- packages
|
||||||
|
pacman: pkg={{item}} state=installed
|
||||||
|
with_items: '{{ rsyslog_package_names }}'
|
||||||
@@ -1,3 +1,25 @@
|
|||||||
# Debian related tasks
|
# Debian related tasks
|
||||||
---
|
---
|
||||||
- include: deb_packages.yml
|
|
||||||
|
- name: Import Adiscon rsyslog Key for apt
|
||||||
|
apt_key: keyserver=keys.gnupg.net id=AEF0CF8E state=present
|
||||||
|
when: use_repo == True and ansible_distribution == 'Debian'
|
||||||
|
|
||||||
|
## TODO: v8-stable for debian wheezy only available at this time, sanitize selection
|
||||||
|
## http://www.rsyslog.com/debian-repository/
|
||||||
|
- 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 == True and ansible_distribution == 'Debian'
|
||||||
|
|
||||||
|
## TODO: v8-stable/v7-stable available, for "ubuntu versions not yet reached end of life".. sanitize selection
|
||||||
|
## http://www.rsyslog.com/ubuntu-repository/
|
||||||
|
- name: Enable Adiscon rsyslog apt repo
|
||||||
|
apt_repository: repo='ppa:adiscon/v{{ repo_releasever }}-stable'
|
||||||
|
when: use_repo == True and ansible_distribution == 'Ubuntu'
|
||||||
|
|
||||||
|
- name: install packages for Debian
|
||||||
|
tags:
|
||||||
|
- rsyslog
|
||||||
|
- packages
|
||||||
|
apt: pkg={{item}} state=installed update_cache=yes
|
||||||
|
with_items: '{{ rsyslog_package_names }}'
|
||||||
@@ -1,3 +1,30 @@
|
|||||||
# RHEL related tasks
|
# RHEL related tasks
|
||||||
---
|
---
|
||||||
- include: rh_packages.yml
|
|
||||||
|
- name: Check Adiscon rsyslog GPG Key presence
|
||||||
|
tags:
|
||||||
|
- rsyslog
|
||||||
|
- packages
|
||||||
|
stat: path=/etc/pki/rpm-gpg/RPM-GPG-KEY-Adiscon
|
||||||
|
register: adiscon_gpg_key
|
||||||
|
|
||||||
|
- name: Import Adiscon rsyslog GPG Key for RHEL
|
||||||
|
tags:
|
||||||
|
- rsyslog
|
||||||
|
- packages
|
||||||
|
rpm_key: key=http://rpms.adiscon.com/RPM-GPG-KEY-Adiscon state=present
|
||||||
|
when: adiscon_gpg_key.stat.exists == False and use_repo == True
|
||||||
|
|
||||||
|
- name: Enable Adiscon rsyslog yum repo
|
||||||
|
tags:
|
||||||
|
- rsyslog
|
||||||
|
- packages
|
||||||
|
template: src=rsyslog.yum.repo.j2 dest=/etc/yum.repos.d/rsyslog.repo
|
||||||
|
when: use_repo == True
|
||||||
|
|
||||||
|
- name: install packages for RHEL
|
||||||
|
tags:
|
||||||
|
- rsyslog
|
||||||
|
- packages
|
||||||
|
yum: pkg={{item}} state=latest
|
||||||
|
with_items: '{{ rsyslog_package_names }}'
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
# Install packages for RHEL
|
|
||||||
---
|
|
||||||
- name: install packages for RHEL
|
|
||||||
tags:
|
|
||||||
- rsyslog
|
|
||||||
- packages
|
|
||||||
yum: pkg={{item}} state=installed
|
|
||||||
with_items: '{{ rsyslog_package_names }}'
|
|
||||||
13
templates/rsyslog.yum.repo.j2
Normal file
13
templates/rsyslog.yum.repo.j2
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
## {{ ansible_managed }}
|
||||||
|
|
||||||
|
[rsyslog_{{ repo_releasever }}]
|
||||||
|
name=Adiscon CentOS-{{ ansible_distribution_major_version }} - local packages for {{ ansible_architecture }}
|
||||||
|
baseurl=http://rpms.adiscon.com/v7-stable/epel-{{ ansible_distribution_major_version }}/{{ ansible_architecture }}
|
||||||
|
enabled=1
|
||||||
|
{% if ansible_distribution_major_version == 5 %}
|
||||||
|
gpgcheck=0
|
||||||
|
{% else %}
|
||||||
|
gpgcheck=1
|
||||||
|
{% endif %}
|
||||||
|
gpgkey=http://rpms.adiscon.com/RPM-GPG-KEY-Adiscon
|
||||||
|
protect=1
|
||||||
Reference in New Issue
Block a user