You've already forked ansible-role-rsyslog
Add molecule
This commit is contained in:
33
.yamllint
Normal file
33
.yamllint
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
# Based on ansible-lint config
|
||||||
|
extends: default
|
||||||
|
|
||||||
|
rules:
|
||||||
|
braces:
|
||||||
|
max-spaces-inside: 1
|
||||||
|
level: error
|
||||||
|
brackets:
|
||||||
|
max-spaces-inside: 1
|
||||||
|
level: error
|
||||||
|
colons:
|
||||||
|
max-spaces-after: -1
|
||||||
|
level: error
|
||||||
|
commas:
|
||||||
|
max-spaces-after: -1
|
||||||
|
level: error
|
||||||
|
comments: disable
|
||||||
|
comments-indentation: disable
|
||||||
|
document-start: disable
|
||||||
|
empty-lines:
|
||||||
|
max: 3
|
||||||
|
level: error
|
||||||
|
hyphens:
|
||||||
|
level: error
|
||||||
|
indentation: disable
|
||||||
|
key-duplicates: enable
|
||||||
|
line-length: disable
|
||||||
|
new-line-at-end-of-file: disable
|
||||||
|
new-lines:
|
||||||
|
type: unix
|
||||||
|
trailing-spaces: disable
|
||||||
|
truthy: disable
|
||||||
22
molecule/default/INSTALL.rst
Normal file
22
molecule/default/INSTALL.rst
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
*******
|
||||||
|
Docker driver installation guide
|
||||||
|
*******
|
||||||
|
|
||||||
|
Requirements
|
||||||
|
============
|
||||||
|
|
||||||
|
* Docker Engine
|
||||||
|
|
||||||
|
Install
|
||||||
|
=======
|
||||||
|
|
||||||
|
Please refer to the `Virtual environment`_ documentation for installation best
|
||||||
|
practices. If not using a virtual environment, please consider passing the
|
||||||
|
widely recommended `'--user' flag`_ when invoking ``pip``.
|
||||||
|
|
||||||
|
.. _Virtual environment: https://virtualenv.pypa.io/en/latest/
|
||||||
|
.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
$ pip install 'molecule[docker]'
|
||||||
7
molecule/default/converge.yml
Normal file
7
molecule/default/converge.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: Converge
|
||||||
|
hosts: all
|
||||||
|
tasks:
|
||||||
|
- name: "Include ansible-role-rsyslog"
|
||||||
|
include_role:
|
||||||
|
name: "ansible-role-rsyslog"
|
||||||
19
molecule/default/molecule.yml
Normal file
19
molecule/default/molecule.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
dependency:
|
||||||
|
name: galaxy
|
||||||
|
driver:
|
||||||
|
name: docker
|
||||||
|
platforms:
|
||||||
|
- name: instance
|
||||||
|
image: "geerlingguy/docker-${MOLECULE_DISTRO:-rockylinux8}-ansible:latest"
|
||||||
|
command: ${MOLECULE_DOCKER_COMMAND:-"/usr/sbin/init"}
|
||||||
|
volumes:
|
||||||
|
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||||
|
capabilities:
|
||||||
|
- SYS_ADMIN
|
||||||
|
privileged: true
|
||||||
|
pre_build_image: true
|
||||||
|
provisioner:
|
||||||
|
name: ansible
|
||||||
|
verifier:
|
||||||
|
name: ansible
|
||||||
9
molecule/default/verify.yml
Normal file
9
molecule/default/verify.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
# This is an example playbook to execute Ansible tests.
|
||||||
|
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
tasks:
|
||||||
|
- name: Example assertion
|
||||||
|
assert:
|
||||||
|
that: true
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
# 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
|
||||||
@@ -99,6 +103,10 @@
|
|||||||
- restart rsyslog
|
- restart rsyslog
|
||||||
when: rsyslog_os_supported == True
|
when: rsyslog_os_supported == True
|
||||||
|
|
||||||
|
- name: Reload systemd
|
||||||
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
|
|
||||||
- name: enable service
|
- name: enable service
|
||||||
tags:
|
tags:
|
||||||
- rsyslog
|
- rsyslog
|
||||||
|
|||||||
8
vars/Rocky.yml
Normal file
8
vars/Rocky.yml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# RedHat Family OS defaults
|
||||||
|
---
|
||||||
|
rsyslog_package_names:
|
||||||
|
- rsyslog
|
||||||
|
rsyslog_service_name: rsyslog
|
||||||
|
rsyslog_file_owner: root
|
||||||
|
rsyslog_file_group: adm
|
||||||
|
rsyslog_os_supported: yes
|
||||||
Reference in New Issue
Block a user