I have to disable ipv6 on 100+ servers. Obviously I don't want to edit grub of every server by hand, and don't want to play around with sed or other crazy stuff.
I tried to do this:
mkdir -p /etc/default/grub.d/
echo 'GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT} ipv6.disable=1"' >> /etc/default/grub.d/disable-ipv6.cfg
But now my machine won't boot! I need a proper, clean, portable solution to disable ipv6 on ubuntu 18.04 :(