Skip to content

Commit 76dd473

Browse files
committed
fix: nftables / iptables on WSL
1 parent 0bed43e commit 76dd473

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

  • scripts/ansible/roles/podman/tasks

scripts/ansible/roles/podman/tasks/main.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,16 @@
158158
group: "{{ podman_user }}"
159159
mode: '0644'
160160

161+
- name: Ensure Podman uses iptables firewall on WSL
162+
become: true
163+
become_user: "{{ podman_user }}"
164+
ini_file:
165+
path: "{{ podman_user_home }}/.config/containers/containers.conf"
166+
section: network
167+
option: firewall_driver
168+
value: '"iptables"'
169+
when: ansible_virtualization_type == "wsl"
170+
161171
- name: Verify Podman installation
162172
command: podman --version
163173
register: podman_verify

0 commit comments

Comments
 (0)