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 (#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:
parent
106c45fc81
commit
0247f6aa6b
2 changed files with 8 additions and 2 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue