mirror of
https://github.com/RWejlgaard/pez-infra.git
synced 2026-05-06 04:14:43 +00:00
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:
parent
106c45fc81
commit
b0c74f6c00
2 changed files with 8 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue