Fix docker-compose package conflict and alpine firewall handler

- Docker role: replace docker-compose with docker-compose-plugin (v2).
  The old docker-compose package conflicts with docker-compose-plugin
  already installed on helsinki-a. Also removes the conflicting package
  if present.

- firewall_alpine handler: use ansible.builtin.shell instead of
  ansible.builtin.command for iptables-restore, since the redirect
  operator (<) requires a shell.
This commit is contained in:
Rasmus Wejlgaard 2026-03-29 17:48:52 +00:00
parent 106c45fc81
commit b0c74f6c00
2 changed files with 8 additions and 2 deletions

View file

@ -5,10 +5,16 @@
ansible.builtin.apt:
name:
- docker.io
- docker-compose
- docker-compose-plugin
state: present
when: ansible_facts["os_family"] == "Debian"
- name: Remove conflicting docker-compose package (Debian)
ansible.builtin.apt:
name: docker-compose
state: absent
when: ansible_facts["os_family"] == "Debian"
- name: Install Docker (Alpine)
community.general.apk:
name:

View file

@ -1,6 +1,6 @@
---
- name: Restore iptables
ansible.builtin.command: iptables-restore < /etc/iptables/rules-save
ansible.builtin.shell: iptables-restore < /etc/iptables/rules-save
changed_when: true
- name: Restart fail2ban