This commit is contained in:
Gitouche 2023-03-06 22:52:05 +01:00
parent 06a819cc50
commit 1c7676940f
7 changed files with 50 additions and 3 deletions

2
.ansible-lint Normal file
View file

@ -0,0 +1,2 @@
skip_list:
- 'role-name'

3
.yamllint Normal file
View file

@ -0,0 +1,3 @@
---
rules:
line-length: disable

View file

@ -7,4 +7,3 @@ icinga2_rpmfiles:
- https://git.garbaye.fr/api/packages/Garbaye/generic/icinga2/{{ icinga2_version }}/icinga2-common-{{ icinga2_version }}-1.el{{ ansible_distribution_major_version }}.{{ ansible_architecture }}.rpm - https://git.garbaye.fr/api/packages/Garbaye/generic/icinga2/{{ icinga2_version }}/icinga2-common-{{ icinga2_version }}-1.el{{ ansible_distribution_major_version }}.{{ ansible_architecture }}.rpm
- https://git.garbaye.fr/api/packages/Garbaye/generic/icinga2/{{ icinga2_version }}/icinga2-selinux-{{ icinga2_version }}-1.el{{ ansible_distribution_major_version }}.{{ ansible_architecture }}.rpm - https://git.garbaye.fr/api/packages/Garbaye/generic/icinga2/{{ icinga2_version }}/icinga2-selinux-{{ icinga2_version }}-1.el{{ ansible_distribution_major_version }}.{{ ansible_architecture }}.rpm
- https://git.garbaye.fr/api/packages/Garbaye/generic/icinga-selinux-common/{{ icinga_selinux_common_version }}/icinga-selinux-common-{{ icinga_selinux_common_version }}-1.el{{ ansible_distribution_major_version }}.noarch.rpm - https://git.garbaye.fr/api/packages/Garbaye/generic/icinga-selinux-common/{{ icinga_selinux_common_version }}/icinga-selinux-common-{{ icinga_selinux_common_version }}-1.el{{ ansible_distribution_major_version }}.noarch.rpm

View file

@ -0,0 +1,7 @@
---
- name: Converge
hosts: all
tasks:
- name: "Include ansible-icinga2-rpminstall"
ansible.builtin.include_role:
name: "ansible-icinga2-rpminstall"

View file

@ -0,0 +1,20 @@
---
dependency:
name: galaxy
driver:
name: podman
lint: |
set -e
yamllint .
ansible-lint
platforms:
- name: rockylinux8
image: docker.io/library/rockylinux:8
pre_build_image: true
- name: rockylinux9
image: docker.io/library/rockylinux:9
pre_build_image: true
provisioner:
name: ansible
verifier:
name: ansible

View file

@ -0,0 +1,16 @@
---
- name: Verify
hosts: all
tasks:
- name: "Collect installed packages"
ansible.builtin.package_facts:
manager: rpm
- name: "Check if packages are installed"
ansible.builtin.assert:
that:
- "'icinga2' in ansible_facts.packages"
- "'icinga2-bin' in ansible_facts.packages"
- "'icinga2-common' in ansible_facts.packages"
- "'icinga2-selinux' in ansible_facts.packages"
- "'icinga-selinux-common' in ansible_facts.packages"

View file

@ -1,6 +1,6 @@
--- ---
- name: Install icinga2 - name: Install icinga2
yum: ansible.builtin.yum:
name: "{{ icinga2_rpmfiles }}" name: "{{ icinga2_rpmfiles }}"
state: present state: present
disable_gpg_check: yes disable_gpg_check: true