Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Do not attempt to create special "host" network
Browse files Browse the repository at this point in the history
Certain setups may wish to use `--network=host`.

The role attempting to create the special `host` network leads to an
error. We can just assume that it's there without having to create it.
  • Loading branch information
spantaleev committed Nov 13, 2023
1 parent c953f99 commit fdad440
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@
until: result is not failed

- name: Ensure Traefik container network exists via community.docker.docker_network
when: devture_systemd_docker_base_container_network_creation_method == 'ansible-module'
when: devture_systemd_docker_base_container_network_creation_method == 'ansible-module' and devture_traefik_container_network != 'host'
community.docker.docker_network:
name: "{{ devture_traefik_container_network }}"

- name: Ensure Traefik container network exists via command
when: devture_systemd_docker_base_container_network_creation_method == 'command'
when: devture_systemd_docker_base_container_network_creation_method == 'command' and devture_traefik_container_network != 'host'
ansible.builtin.command:
cmd: "{{ devture_systemd_docker_base_host_command_docker }} network create {{ devture_traefik_container_network }}"
register: network_creation_result
Expand Down

0 comments on commit fdad440

Please sign in to comment.