Skip to content

Commit

Permalink
Merge branch 'master' into playbooks_for_simplifying_create_checks
Browse files Browse the repository at this point in the history
  • Loading branch information
rndmh3ro authored Aug 7, 2023
2 parents 89823c6 + e74d80b commit e695e5a
Show file tree
Hide file tree
Showing 23 changed files with 192 additions and 204 deletions.
8 changes: 2 additions & 6 deletions .config/ansible-lint.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
---
# .ansible-lint
# exclude_paths included in this file are parsed relative to this file's location
# and not relative to the CWD of execution. CLI arguments passed to the --exclude
# option will be parsed relative to the CWD of execution.
exclude_paths:
- .cache/ # implicit unless exclude_paths is defined in config
- .cache/ # implicit unless exclude_paths is defined in config
- .yamllint
- ../molecule/
- ../.github/
- molecule/
- .github/

warn_list:
Expand Down
1 change: 1 addition & 0 deletions .github/version-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
major-labels: ['semver:major', 'major', 'breaking', 'backwards-incompatible']
minor-labels: ['semver:minor', 'minor', 'enhancement']
patch-labels: ['semver:patch', 'patch', 'bug']
12 changes: 6 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: 'CI - Linting & Testing'
name: CI - Linting & Testing

on:
push:
Expand All @@ -9,7 +9,7 @@ on:
# testing against latest version of ansible-test for each ansible-core
# version
schedule:
- cron: '0 6 * * 1'
- cron: "0 6 * * 1"

concurrency:
group: >-
Expand Down Expand Up @@ -117,12 +117,12 @@ jobs:
run: molecule test
working-directory: ansible_collections/t_systems_mms/ansible_collection_icinga/roles/icinga_agent
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
PY_COLORS: "1"
ANSIBLE_FORCE_COLOR: "1"

- name: Test role icinga_plugins with molecule
run: molecule test
working-directory: ansible_collections/t_systems_mms/ansible_collection_icinga/roles/icinga_plugins
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
PY_COLORS: "1"
ANSIBLE_FORCE_COLOR: "1"
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
with:
fetch-depth: 0

- name: 'Get Previous tag'
- name: Get Previous tag
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@master"
uses: WyriHaximus/github-action-get-previous-tag@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: calculate next version
id: version
Expand All @@ -38,9 +38,9 @@ jobs:
uses: github-actions-x/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
push-branch: 'master'
commit-message: 'update changelog'
force-add: 'true'
push-branch: master
commit-message: update changelog
force-add: true
files: CHANGELOG.md
name: T-Systems MMS
email: [email protected]
Expand All @@ -64,7 +64,7 @@ jobs:
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
release_name: ${{ steps.version.outputs.next-version }}
tag_name: ${{ steps.version.outputs.next-version }}
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## [1.1.1](https://github.com/T-Systems-MMS/ansible-collection-icinga/tree/1.1.1) (2023-07-27)
## [1.1.1](https://github.com/T-Systems-MMS/ansible-collection-icinga/tree/1.1.1) (2023-08-07)

[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga/compare/1.1.0...1.1.1)

Expand All @@ -10,6 +10,7 @@

**Merged pull requests:**

- Linting [\#54](https://github.com/T-Systems-MMS/ansible-collection-icinga/pull/54) ([rndmh3ro](https://github.com/rndmh3ro))
- Update description of the constant config varriable [\#51](https://github.com/T-Systems-MMS/ansible-collection-icinga/pull/51) ([kam193](https://github.com/kam193))
- run CI-tests only once peer week [\#50](https://github.com/T-Systems-MMS/ansible-collection-icinga/pull/50) ([rndmh3ro](https://github.com/rndmh3ro))
- Update actions/checkout action to v3.5.3 [\#49](https://github.com/T-Systems-MMS/ansible-collection-icinga/pull/49) ([renovate[bot]](https://github.com/apps/renovate))
Expand Down
15 changes: 8 additions & 7 deletions galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
namespace: t_systems_mms
name: ansible_collection_icinga
version: 1.1.0
Expand All @@ -11,19 +12,19 @@ description: >-
Additionally, this collection is used to install
the Icinga agent and roll out custom checks for every agent.
dependencies:
t_systems_mms.icinga_director: '*'
t_systems_mms.icinga_business_process: '*'
t_systems_mms.icinga_director: "*"
t_systems_mms.icinga_business_process: "*"
license:
- GPL-3.0-only
license_file: ''
license_file: ""
tags:
- icinga
- monitoring
- agent
- collection
- director
- plugins
repository: 'https://github.com/T-Systems-MMS/ansible-collection-icinga'
documentation: 'https://github.com/T-Systems-MMS/ansible-collection-icinga'
homepage: 'https://github.com/T-Systems-MMS/ansible-collection-icinga'
issues: 'https://github.com/T-Systems-MMS/ansible-collection-icinga/issues'
repository: https://github.com/T-Systems-MMS/ansible-collection-icinga
documentation: https://github.com/T-Systems-MMS/ansible-collection-icinga
homepage: https://github.com/T-Systems-MMS/ansible-collection-icinga
issues: https://github.com/T-Systems-MMS/ansible-collection-icinga/issues
2 changes: 1 addition & 1 deletion meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
requires_ansible: '>=2.9.10'
requires_ansible: ">=2.9.10"
94 changes: 47 additions & 47 deletions roles/icinga_agent/molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
- name: Import icinga2 key
ansible.builtin.rpm_key:
state: present
key: "https://packages.icinga.com/icinga.key"
key: https://packages.icinga.com/icinga.key
when: ansible_os_family == 'RedHat'
tags:
- molecule-idempotence-notest
Expand All @@ -38,7 +38,7 @@

- name: Add icinga2 repo key
ansible.builtin.apt_key:
url: "http://packages.icinga.com/icinga.key"
url: http://packages.icinga.com/icinga.key
state: present
when: ansible_os_family == 'Debian'
tags:
Expand All @@ -58,17 +58,17 @@

- name: Install icinga2 build dependencies
ansible.builtin.apt:
pkg: "icinga2"
state: "build-dep"
pkg: icinga2
state: build-dep
update_cache: true
when: ansible_os_family == 'Debian'
tags:
- molecule-idempotence-notest

- name: Install icinga2 basic packages
ansible.builtin.apt:
name: "icinga2"
state: "present"
name: icinga2
state: present
update_cache: true
when: ansible_os_family == 'Debian'
tags:
Expand All @@ -82,18 +82,18 @@

vars:
icinga_agent_endpoints:
- name: "icinga2-master1.localdomain"
host: "192.154.44.101"
- name: "icinga2-satellite1.localdomain"
host: "192.154.44.107"
- name: icinga2-master1.localdomain
host: 192.154.44.101
- name: icinga2-satellite1.localdomain
host: 192.154.44.107
icinga_agent_zones:
- name: "master"
- name: master
endpoints:
- "icinga2-master1.localdomain"
- name: "satellite"
- icinga2-master1.localdomain
- name: satellite
endpoints:
- "icinga2-satellite1.localdomain"
parent: "master"
- icinga2-satellite1.localdomain
parent: master

post_tasks:
- name: Verify that icinga2.conf exists
Expand All @@ -105,19 +105,19 @@
- name: Validate icinga2.conf results for RedHat based Distributions
ansible.builtin.assert:
that:
- "result_icinga2_conf.state == 'file'"
- "result_icinga2_conf.mode == '0640'"
- "result_icinga2_conf.owner == 'icinga'"
- "result_icinga2_conf.group == 'icinga'"
- result_icinga2_conf.state == 'file'
- result_icinga2_conf.mode == '0640'
- result_icinga2_conf.owner == 'icinga'
- result_icinga2_conf.group == 'icinga'
when: ansible_os_family == 'RedHat'

- name: Validate icinga2.conf results for Debian based Distributions
ansible.builtin.assert:
that:
- "result_icinga2_conf.state == 'file'"
- "result_icinga2_conf.mode == '0640'"
- "result_icinga2_conf.owner == 'nagios'"
- "result_icinga2_conf.group == 'nagios'"
- result_icinga2_conf.state == 'file'
- result_icinga2_conf.mode == '0640'
- result_icinga2_conf.owner == 'nagios'
- result_icinga2_conf.group == 'nagios'
when: ansible_os_family == 'Debian'

- name: Verify that constants.conf exists
Expand All @@ -129,19 +129,19 @@
- name: Validate constants.conf results for RedHat based Distributions
ansible.builtin.assert:
that:
- "result_constants_conf.state == 'file'"
- "result_constants_conf.mode == '0640'"
- "result_constants_conf.owner == 'icinga'"
- "result_constants_conf.group == 'icinga'"
- result_constants_conf.state == 'file'
- result_constants_conf.mode == '0640'
- result_constants_conf.owner == 'icinga'
- result_constants_conf.group == 'icinga'
when: ansible_os_family == 'RedHat'

- name: Validate constants.conf results for Debian based Distributions
ansible.builtin.assert:
that:
- "result_constants_conf.state == 'file'"
- "result_constants_conf.mode == '0640'"
- "result_constants_conf.owner == 'nagios'"
- "result_constants_conf.group == 'nagios'"
- result_constants_conf.state == 'file'
- result_constants_conf.mode == '0640'
- result_constants_conf.owner == 'nagios'
- result_constants_conf.group == 'nagios'
when: ansible_os_family == 'Debian'

- name: Verify that zones.conf exists
Expand All @@ -153,19 +153,19 @@
- name: Validate zones.conf results for RedHat based Distributions
ansible.builtin.assert:
that:
- "result_zones_conf.state == 'file'"
- "result_zones_conf.mode == '0640'"
- "result_zones_conf.owner == 'icinga'"
- "result_zones_conf.group == 'icinga'"
- result_zones_conf.state == 'file'
- result_zones_conf.mode == '0640'
- result_zones_conf.owner == 'icinga'
- result_zones_conf.group == 'icinga'
when: ansible_os_family == 'RedHat'

- name: Validate zones.conf results for Debian based Distributions
ansible.builtin.assert:
that:
- "result_zones_conf.state == 'file'"
- "result_zones_conf.mode == '0640'"
- "result_zones_conf.owner == 'nagios'"
- "result_zones_conf.group == 'nagios'"
- result_zones_conf.state == 'file'
- result_zones_conf.mode == '0640'
- result_zones_conf.owner == 'nagios'
- result_zones_conf.group == 'nagios'
when: ansible_os_family == 'Debian'

- name: Verify that api.conf exists
Expand All @@ -177,19 +177,19 @@
- name: Validate api.conf results for RedHat based Distributions
ansible.builtin.assert:
that:
- "result_api_conf.state == 'file'"
- "result_api_conf.mode == '0640'"
- "result_api_conf.owner == 'icinga'"
- "result_api_conf.group == 'icinga'"
- result_api_conf.state == 'file'
- result_api_conf.mode == '0640'
- result_api_conf.owner == 'icinga'
- result_api_conf.group == 'icinga'
when: ansible_os_family == 'RedHat'

- name: Validate api.conf results for Debian based Distributions
ansible.builtin.assert:
that:
- "result_api_conf.state == 'file'"
- "result_api_conf.mode == '0640'"
- "result_api_conf.owner == 'nagios'"
- "result_api_conf.group == 'nagios'"
- result_api_conf.state == 'file'
- result_api_conf.mode == '0640'
- result_api_conf.owner == 'nagios'
- result_api_conf.group == 'nagios'
when: ansible_os_family == 'Debian'

- name: Verify that icinga2 package is installed
Expand Down
6 changes: 3 additions & 3 deletions roles/icinga_agent/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ driver:
name: docker
platforms:
- name: centos7
image: "ebesson/docker-centos7-systemd:latest"
image: ebesson/docker-centos7-systemd:latest
volumes:
- /sys:/sys:rw
cgroupns_mode: host
privileged: true
pre_build_image: true
command: ""
- name: rockylinux8
image: "eniocarboni/docker-rockylinux-systemd:8"
image: eniocarboni/docker-rockylinux-systemd:8
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: true
pre_build_image: true
command: ""
- name: debian11
image: "geerlingguy/docker-debian11-ansible:latest"
image: geerlingguy/docker-debian11-ansible:latest
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
Loading

0 comments on commit e695e5a

Please sign in to comment.