diff options
author | Alex Auvolat <alex@adnab.me> | 2020-05-21 14:00:47 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-05-21 14:00:47 +0200 |
commit | 78f452587ae623033283bda1cb14155c2e49309e (patch) | |
tree | 37a5de463a3327eb4ab2934a1a6665d0d6ffd42d | |
parent | 5d3fdfbc161fb94854ac0c0eaf58744c7e48debf (diff) | |
download | infrastructure-78f452587ae623033283bda1cb14155c2e49309e.tar.gz infrastructure-78f452587ae623033283bda1cb14155c2e49309e.zip |
Make the net ansible section `never` run and add appropriate warnings
-rw-r--r-- | ansible/cluster_nodes.yml | 21 | ||||
-rw-r--r-- | ansible/roles/network/files/rules.v6 | 6 | ||||
-rw-r--r-- | ansible/roles/network/templates/rules.v4.j2 | 5 |
3 files changed, 25 insertions, 7 deletions
diff --git a/ansible/cluster_nodes.yml b/ansible/cluster_nodes.yml index 94521e6..d36a9d6 100644 --- a/ansible/cluster_nodes.yml +++ b/ansible/cluster_nodes.yml @@ -1,24 +1,31 @@ --- - hosts: cluster_nodes - #serial: 1 roles: - role: common tags: base - - role: users tags: account -# UNSAFE -# - role: network -# tags: net +# UNSAFE!! This section is disabled by default, to run it the flags -t net should be added +# to the ansible playbook command line. +# Reason: when rules.{v4,v6} are changed, the whole iptables configuration is reloaded. +# This creates issues with Docker, which injects its own configuration in iptables when it starts. +# In practice, most (all?) containers will break if rules.{v4,v6} are changed, +# and docker will have to be restared. +- hosts: cluster_nodes + roles: + - role: network + tags: [ net, never ] +- hosts: cluster_nodes + serial: 1 + roles: - role: consul tags: kv - - role: nomad tags: orchestrator -# UNSAFE +# UNSAFE!! This section configures glusterfs. Once done, don't run it ever again as it may break stuff. # - role: storage # tags: sto diff --git a/ansible/roles/network/files/rules.v6 b/ansible/roles/network/files/rules.v6 index 0f402bd..17ff71c 100644 --- a/ansible/roles/network/files/rules.v6 +++ b/ansible/roles/network/files/rules.v6 @@ -1,3 +1,9 @@ +# WARNING!! When rules.{v4,v6} are changed, the whole iptables configuration is reloaded. +# This creates issues with Docker, which injects its own configuration in iptables when it starts. +# In practice, most (all?) containers will break if rules.{v4,v6} are changed, +# and docker will have to be restared. + + *filter :INPUT DROP [0:0] :FORWARD DROP [0:0] diff --git a/ansible/roles/network/templates/rules.v4.j2 b/ansible/roles/network/templates/rules.v4.j2 index a77852f..b60d1ee 100644 --- a/ansible/roles/network/templates/rules.v4.j2 +++ b/ansible/roles/network/templates/rules.v4.j2 @@ -1,3 +1,8 @@ +# WARNING!! When rules.{v4,v6} are changed, the whole iptables configuration is reloaded. +# This creates issues with Docker, which injects its own configuration in iptables when it starts. +# In practice, most (all?) containers will break if rules.{v4,v6} are changed, +# and docker will have to be restared. + *filter :INPUT DROP [0:0] |