Skip to content

Commit

Permalink
Merge pull request #36 from adfinis/fix/debian/remove_old_repo_first
Browse files Browse the repository at this point in the history
fix(debian): remove old apt repository first
  • Loading branch information
Daenou authored Oct 3, 2024
2 parents 42ebc64 + 44eff3e commit c630f91
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tasks/installation.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
---
- name: Remove old icinga apt repository without key
ansible.builtin.apt_repository:
repo: "deb http://packages.icinga.com/{{ ansible_distribution | lower }} icinga-{{ ansible_distribution_release }} main"
state: absent
when:
- ansible_os_family == 'Debian'
- (ansible_lsb.id != 'Univention' or ansible_distribution_release != 'stretch')
notify: Update package repository

- name: Install dependencies for debian-based distributions
ansible.builtin.apt:
name: " {{ item }}"
Expand Down Expand Up @@ -46,15 +55,6 @@
state: present
when: ansible_os_family == 'Debian'

- name: Remove old icinga apt repository without key
ansible.builtin.apt_repository:
repo: "deb http://packages.icinga.com/{{ ansible_distribution | lower }} icinga-{{ ansible_distribution_release }} main"
state: absent
when:
- ansible_os_family == 'Debian'
- (ansible_lsb.id != 'Univention' or ansible_distribution_release != 'stretch')
notify: Update package repository

- name: Configure icinga apt repository
ansible.builtin.apt_repository:
repo: "{{ icinga2_agent_apt.repo }}"
Expand Down

0 comments on commit c630f91

Please sign in to comment.