Feature 1/path testing #2

Merged
srgvg merged 2 commits from feature-1/path-testing into master 2020-09-17 22:04:59 +00:00
srgvg commented 2020-09-17 20:29:01 +00:00 (Migrated from github.com)

Ansible role which installs and configures logrotate, based of https://github.com/arillso/ansible.logrotate 1.5.2

An additional patch allows a logrotate role to test if paths exist before writing a logrotate config to the server.
Load the roles default vars with custom paths and per path parameters, and run the playbook across a dynamic
infrastructure and only write logrotate rules to the appropriate system with the correct paths present.

Ansible role which installs and configures logrotate, based of https://github.com/arillso/ansible.logrotate 1.5.2 An additional patch allows a logrotate role to test if paths exist before writing a logrotate config to the server. Load the roles default vars with custom paths and per path parameters, and run the playbook across a dynamic infrastructure and only write logrotate rules to the appropriate system with the correct paths present.
srgvg commented 2020-09-17 20:32:02 +00:00 (Migrated from github.com)

Tested with following playbook

➞  ls -ld test.yml roles/ansible-logrotate-plusplus/; cat test.yml
drwxr-xr-x 1 serge serge 100 Sep 17 22:23 roles/ansible-logrotate-plusplus/
-rw-r--r-- 1 serge serge  86 Sep 17 21:38 test.yml
---
- hosts: localhost
  gather_facts: true
  roles:
    - ansible-logrotate-plusplus

and command:

ansible-playbook test.yml -i localhost, --check --diff -K -v
Tested with following playbook ``` ➞ ls -ld test.yml roles/ansible-logrotate-plusplus/; cat test.yml drwxr-xr-x 1 serge serge 100 Sep 17 22:23 roles/ansible-logrotate-plusplus/ -rw-r--r-- 1 serge serge 86 Sep 17 21:38 test.yml --- - hosts: localhost gather_facts: true roles: - ansible-logrotate-plusplus ``` and command: ``` ansible-playbook test.yml -i localhost, --check --diff -K -v ```
reelsense (Migrated from github.com) approved these changes 2020-09-17 22:04:47 +00:00
Sign in to join this conversation.
No description provided.