Merge "Add CentOS7 support to rsyslog client"
This commit is contained in:
commit
8f2d062e8d
|
@ -0,0 +1,22 @@
|
|||
export VIRTUAL_ENV=$(pwd)
|
||||
export ANSIBLE_HOST_KEY_CHECKING=False
|
||||
export ANSIBLE_SSH_CONTROL_PATH=/tmp/%%h-%%r
|
||||
|
||||
# TODO (odyssey4me) These are only here as they are non-standard folder
|
||||
# names for Ansible 1.9.x. We are using the standard folder names for
|
||||
# Ansible v2.x. We can remove this when we move to Ansible 2.x.
|
||||
export ANSIBLE_ACTION_PLUGINS=${HOME}/.ansible/plugins/action
|
||||
export ANSIBLE_CALLBACK_PLUGINS=${HOME}/.ansible/plugins/callback
|
||||
export ANSIBLE_FILTER_PLUGINS=${HOME}/.ansible/plugins/filter
|
||||
export ANSIBLE_LOOKUP_PLUGINS=${HOME}/.ansible/plugins/lookup
|
||||
|
||||
# This is required as the default is the current path or a path specified
|
||||
# in ansible.cfg
|
||||
export ANSIBLE_LIBRARY=${HOME}/.ansible/plugins/library
|
||||
|
||||
# This is required as the default is '/etc/ansible/roles' or a path
|
||||
# specified in ansible.cfg
|
||||
export ANSIBLE_ROLES_PATH=${HOME}/.ansible/roles:$(pwd)/..
|
||||
|
||||
echo "Run manual functional tests by executing the following:"
|
||||
echo "# ./.tox/functional/bin/ansible-playbook -i tests/inventory tests/test.yml -e \"rolename=$(pwd)\""
|
|
@ -23,6 +23,10 @@ galaxy_info:
|
|||
- name: Ubuntu
|
||||
versions:
|
||||
- trusty
|
||||
- xenial
|
||||
- name: EL
|
||||
versions:
|
||||
- 7
|
||||
categories:
|
||||
- client
|
||||
- rsyslog
|
||||
|
|
|
@ -10,6 +10,17 @@
|
|||
# will fall back to installing its default packages which
|
||||
# will potentially be detrimental to the tests executed.
|
||||
|
||||
# OpenStack-CI's Jenkins needs curl
|
||||
# TODO(odyssey4me) remove this once https://review.openstack.org/288634 has merged
|
||||
# and the disk images are rebuilt and redeployed.
|
||||
curl
|
||||
wget
|
||||
|
||||
# Requirements for Paramiko 2.0
|
||||
libssl-dev
|
||||
libffi-dev
|
||||
libssl-dev [platform:dpkg]
|
||||
libffi-dev [platform:dpkg]
|
||||
libffi-devel [platform:rpm]
|
||||
openssl-devel [platform:rpm]
|
||||
|
||||
# For selinux
|
||||
libselinux-python [platform:rpm]
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
features:
|
||||
- CentOS7 support has been added to the ``rsyslog_client``
|
||||
role.
|
|
@ -22,6 +22,10 @@ if [ "$(which apt-get)" ]; then
|
|||
apt-get install -y build-essential python2.7 python-dev git-core libssl-dev libffi-dev
|
||||
fi
|
||||
|
||||
if [ "$(which yum)" ]; then
|
||||
yum install -y '@Development Tools' python-devel git libffi-devel openssl-devel
|
||||
fi
|
||||
|
||||
# get pip, if necessary
|
||||
if [ ! "$(which pip)" ]; then
|
||||
curl --silent --show-error --retry 5 \
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
||||
- "{{ ansible_distribution | lower }}.yml"
|
||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
||||
- "{{ ansible_os_family | lower }}.yml"
|
||||
tags:
|
||||
- always
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
apt_repository:
|
||||
repo: "{{ item.repo }}"
|
||||
state: "{{ item.state }}"
|
||||
with_items: "{{ rsyslog_client_apt_repos }}"
|
||||
with_items: "{{ rsyslog_client_repos }}"
|
||||
register: add_repos
|
||||
until: add_repos|success
|
||||
retries: 5
|
||||
|
@ -52,6 +52,6 @@
|
|||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: "{{ rsyslog_client_apt_packages }}"
|
||||
with_items: "{{ rsyslog_client_packages }}"
|
||||
tags:
|
||||
- rsyslog-client-apt-packages
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
# Copyright 2016, Rackspace US, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
#TODO(cloudnull) Remove this task once we move to Ansible 2.1
|
||||
# where we can leverage the `yum_repository` module:
|
||||
# https://docs.ansible.com/ansible/yum_repository_module.html
|
||||
- name: Rsyslog yum repository
|
||||
copy:
|
||||
content: |
|
||||
[{{ item.name }}]
|
||||
name={{ item.name }}
|
||||
description={{ item.description }}
|
||||
baseurl={{ item.baseurl }}
|
||||
gpgkey={{ item.gpgkey }}
|
||||
gpgcheck=1
|
||||
enabled=1
|
||||
dest: "/etc/yum.repos.d/{{ item.file }}.repo"
|
||||
register: add_repos
|
||||
until: add_repos|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: "{{ rsyslog_client_repos }}"
|
||||
tags:
|
||||
- rsyslog-client-yum-repositories
|
||||
|
||||
- name: Install rsyslog packages
|
||||
yum:
|
||||
pkg: "{{ item }}"
|
||||
state: latest
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: "{{ rsyslog_client_packages }}"
|
||||
tags:
|
||||
- rsyslog-client-yum-packages
|
|
@ -13,8 +13,14 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- include: install-apt.yml
|
||||
- include: rsyslog_client_install-apt.yml
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
tags:
|
||||
- install-apt
|
||||
|
||||
- include: rsyslog_client_install-yum.yml
|
||||
when:
|
||||
- ansible_pkg_mgr == 'yum'
|
||||
tags:
|
||||
- install-yum
|
||||
|
|
|
@ -13,6 +13,18 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Ensure adm group exists
|
||||
group:
|
||||
name: "adm"
|
||||
state: present
|
||||
|
||||
- name: Ensure syslog user exists
|
||||
user:
|
||||
name: "syslog"
|
||||
groups: "adm"
|
||||
system: yes
|
||||
state: present
|
||||
|
||||
- name: Ensure ownership on working directory is correct
|
||||
file:
|
||||
path: "{{ rsyslog_client_spool_directory }}"
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
## APT Cache Options
|
||||
cache_timeout: 600
|
||||
|
||||
rsyslog_client_apt_repos: []
|
||||
rsyslog_client_repos: []
|
||||
|
||||
# Example override to specify which repo the packages should come from
|
||||
# rsyslog_client_apt_repos:
|
||||
# rsyslog_client_repos:
|
||||
# - { repo: "ppa:adiscon/v8-stable", state: "present" }
|
||||
|
||||
rsyslog_client_apt_packages:
|
||||
rsyslog_client_packages:
|
||||
- rsyslog
|
||||
- logrotate
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
# Copyright 2014, Rackspace US, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
rsyslog_client_repos: []
|
||||
|
||||
rsyslog_client_packages:
|
||||
- rsyslog
|
||||
- logrotate
|
Loading…
Reference in New Issue