Skip to content

Commit 005b84d

Browse files
committed
Switch to deb822 format
Switch from .list to .sources format for deb repositories. Adjust workflows to install python3-debian. Fix mistake in workflow that led to fewer Icinga Web 2 modules being tested.
1 parent 0e4cad9 commit 005b84d

File tree

17 files changed

+98
-42
lines changed

17 files changed

+98
-42
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
minor_changes:
2+
- The error messages about unsupported operating systems have been tuned. They should now appear if and only if the actual OS is in fact not supported instead of appearing after unrelated task failures.
3+
- The deb repositories made available by the :code:`repos` role now use the `deb822 format <https://repolib.readthedocs.io/en/latest/deb822-format.html>`__.
4+
This can lead to APT warnings on systems that already have the repositories deployed using the old format (sources.list). To fix this, simply remove the old :code:`icinga.list` file after the repositories have been deployed in the new format.

molecule/default/converge.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
hosts: all
55
vars:
66
icingaweb2_modules:
7+
businessprocess:
8+
enabled: true
9+
source: package
10+
custom_process_files:
11+
- name: test.conf
12+
src_path: test.conf
713
graphite:
814
enabled: true
915
source: package
@@ -48,6 +54,7 @@
4854
host: "127.0.0.1"
4955
monitoring:
5056
enabled: false
57+
source: package
5158
backends:
5259
icinga2_ido_mysql:
5360
type: ido
@@ -120,13 +127,6 @@
120127
- zones.d/main/commands
121128
- zones.d/main/hosts
122129
- zones.d/main/services
123-
icingaweb2_modules:
124-
businessprocess:
125-
enabled: true
126-
source: package
127-
custom_process_files:
128-
- name: test.conf
129-
src_path: test.conf
130130
collections:
131131
- netways.icinga
132132
pre_tasks:

molecule/default/prepare.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
name:
88
- gpg
99
- apt-transport-https
10+
- python3-debian
1011
update_cache: yes
1112
when: ansible_os_family == "Debian"

molecule/local-default-pgsql/prepare.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
name:
99
- gpg
1010
- apt-transport-https
11+
- python3-debian
1112
update_cache: yes
1213
when: ansible_os_family == "Debian"

molecule/local-default/prepare.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
name:
99
- gpg
1010
- apt-transport-https
11+
- python3-debian
1112
update_cache: yes
1213
when: ansible_os_family == "Debian"

molecule/role-icingadb/prepare.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
name:
88
- gpg
99
- apt-transport-https
10+
- python3-debian
1011
update_cache: yes
1112
when: ansible_os_family == "Debian"

molecule/role-icingadb_redis/prepare.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
name:
88
- gpg
99
- apt-transport-https
10+
- python3-debian
1011
update_cache: yes
1112
when: ansible_os_family == "Debian"

molecule/role-icingaweb2/prepare.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
name:
88
- gpg
99
- apt-transport-https
10+
- python3-debian
1011
update_cache: yes
1112
when: ansible_os_family == "Debian"

roles/icinga2/tasks/install.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
---
22
- name: Check supported operatingsystems
3+
vars:
4+
_paths: "{{ ansible_search_path }}"
5+
_file: "install_on_{{ ansible_os_family }}.yml"
6+
_tasks_file: "{{ lookup('first_found', paths=_paths, files=_file, skip=true) }}"
37
block:
48
- name: Install on {{ ansible_os_family }}
9+
when: _tasks_file | length > 0
510
ansible.builtin.include_tasks: "install_on_{{ ansible_os_family }}.yml"
6-
rescue:
11+
712
- name: "OS family not supported!"
13+
when: _tasks_file | length == 0
814
ansible.builtin.fail:
9-
msg: "The OS {{ ansible_os_family }} is not supported!"
15+
msg: "The OS '{{ ansible_os_family }}' is not supported!"
1016

1117
- name: Prepare fragments path
1218
ansible.builtin.file:

roles/icinga_kubernetes/tasks/main.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,19 @@
1313
- "{{ role_path }}/vars"
1414

1515
- name: Check supported operatingsystems
16+
vars:
17+
_paths: "{{ ansible_search_path }}"
18+
_file: "install_on_{{ ansible_os_family | lower }}.yml"
19+
_tasks_file: "{{ lookup('first_found', paths=_paths, files=_file, skip=true) }}"
1620
block:
1721
- name: Include OS specific installation
22+
when: _tasks_file | length > 0
1823
ansible.builtin.include_tasks: "install_on_{{ ansible_os_family | lower }}.yml"
19-
rescue:
24+
2025
- name: "OS family not supported!"
26+
when: _tasks_file | length == 0
2127
ansible.builtin.fail:
22-
msg: "The OS {{ ansible_os_family }} is not supported!"
28+
msg: "The OS '{{ ansible_os_family }}' is not supported!"
2329

2430
- name: Include Tasks to configure Icinga Kubernetes
2531
ansible.builtin.include_tasks: manage_config.yml

0 commit comments

Comments
 (0)