Fix docker-compose package conflict and alpine firewall handler (#22)

- 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 19:11:52 +01:00 committed by GitHub
parent 106c45fc81
commit 0247f6aa6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View file

@ -5,10 +5,16 @@
ansible.builtin.apt: ansible.builtin.apt:
name: name:
- docker.io - docker.io
- docker-compose - docker-compose-plugin
state: present state: present
when: ansible_facts["os_family"] == "Debian" 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) - name: Install Docker (Alpine)
community.general.apk: community.general.apk:
name: name:

View file

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