From 0e9b9764db801da6f80ed93627776d317b2b9df4 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 16 May 2024 23:47:19 +0200 Subject: [PATCH] Ensure every instance is started with IPv6 enabled --- facts/Vagrantfile | 2 -- facts/get_facts.sh | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/facts/Vagrantfile b/facts/Vagrantfile index eb6c25a5..cb330b8a 100644 --- a/facts/Vagrantfile +++ b/facts/Vagrantfile @@ -165,7 +165,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| host.vm.box = 'generic/rhel8' host.vm.synced_folder '.', '/vagrant' host.vm.provision 'file', source: 'Gemfile', destination: 'Gemfile' - host.vm.provision 'shell', inline: 'sysctl -w net.ipv6.conf.all.disable_ipv6=0' host.vm.provision 'shell', path: 'get_facts.sh' host.vm.provision 'shell', inline: '/sbin/shutdown -h now' end @@ -173,7 +172,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| host.vm.box = 'generic/rhel9' host.vm.synced_folder '.', '/vagrant' host.vm.provision 'file', source: 'Gemfile', destination: 'Gemfile' - host.vm.provision 'shell', inline: 'sysctl -w net.ipv6.conf.all.disable_ipv6=0' host.vm.provision 'shell', path: 'get_facts.sh' host.vm.provision 'shell', inline: '/sbin/shutdown -h now' end diff --git a/facts/get_facts.sh b/facts/get_facts.sh index 357a1218..27806b98 100755 --- a/facts/get_facts.sh +++ b/facts/get_facts.sh @@ -2,6 +2,9 @@ export PATH=/opt/puppetlabs/bin:$PATH +# ensure IPv6 is always enabled, some boxes disable it by default, e.g. Fedora and RedHat +sysctl -w net.ipv6.conf.all.disable_ipv6=0 + puppetAgentVersionList='/vagrant/versions.txt' if test ! -f $puppetAgentVersionList; then echo 'Missing version list' >&2