From 0bd4bb722a062b3499b9f4ca51295a8533fb470b Mon Sep 17 00:00:00 2001 From: Deimos Date: Thu, 27 Sep 2018 16:58:54 -0600 Subject: [PATCH] Prod server: force ipv4 in apt Without this, apt seems to try to use ipv6 to connect to some of the repos, and it often hangs or fails. --- salt/salt/prod-config.sls | 4 ++++ salt/salt/top.sls | 1 + 2 files changed, 5 insertions(+) create mode 100644 salt/salt/prod-config.sls diff --git a/salt/salt/prod-config.sls b/salt/salt/prod-config.sls new file mode 100644 index 0000000..2c4c40e --- /dev/null +++ b/salt/salt/prod-config.sls @@ -0,0 +1,4 @@ +# Force apt not to use IPv6 (seems to hang often) +/etc/apt/apt.conf.d/99force-ipv4: + file.managed: + - contents: 'Acquire::ForceIPv4 "true";' diff --git a/salt/salt/top.sls b/salt/salt/top.sls index e9b9c19..4d5434f 100644 --- a/salt/salt/top.sls +++ b/salt/salt/top.sls @@ -30,6 +30,7 @@ base: 'prod': - nginx.static-sites-config - raven + - prod-config 'monitoring': - nginx - self-signed-cert