Skip to content

Commit

Permalink
automatic linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Gumprich committed Aug 7, 2023
1 parent d65d189 commit 02d4980
Show file tree
Hide file tree
Showing 22 changed files with 200 additions and 226 deletions.
7 changes: 4 additions & 3 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']
---
major-labels: [semver:major, major, breaking, backwards-incompatible]
minor-labels: [semver:minor, minor, enhancement]
patch-labels: [semver:patch, patch, bug]
16 changes: 8 additions & 8 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
name: 'CI - Linting & Testing'
name: CI - Linting & Testing

on:
true:
push:
pull_request:
# Run CI once per week (at 06:00 UTC)
# This ensures that even if there haven't been commits that we are still
# testing against latest version of ansible-test for each ansible-core
# version
schedule:
- cron: '0 6 * * 1'
- cron: "0 6 * * 1"

jobs:
ansible-sanity-tests:
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Run Linting
uses: ansible/ansible-lint-action@v6
with:
targets: "roles/"
targets: roles/
override-deps: |
rich>=9.5.1,<11.0.0
args: ""
Expand Down Expand Up @@ -81,12 +81,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"
2 changes: 1 addition & 1 deletion .github/workflows/galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Publish collection to Ansible Galaxy

on:
true:
release:
types:
- published
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: New release

on:
true:
workflow_dispatch:
push:
branches:
Expand All @@ -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
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 02d4980

Please sign in to comment.