Loading deploy/pyinfra/lib/operations/kernel.py +15 −0 Original line number Diff line number Diff line Loading @@ -69,3 +69,18 @@ systemd.daemon_reload( name="Reload systemd", _sudo=True ) # Disable IPv6 at the kernel level via GRUB files.replace( name="Disable IPv6 in GRUB", path="/etc/default/grub", text=r'^GRUB_CMDLINE_LINUX="((?!.*ipv6\.disable=1).*)"$', replace=r'GRUB_CMDLINE_LINUX="\1 ipv6.disable=1"', _sudo=True ) server.shell( name="Update GRUB", commands=["update-grub"], _sudo=True ) deploy/pyinfra/tasks/system/kernel.py +15 −0 Original line number Diff line number Diff line Loading @@ -68,3 +68,18 @@ systemd.daemon_reload( name="Reload systemd", _sudo=True ) # Disable IPv6 at the kernel level via GRUB files.replace( name="Disable IPv6 in GRUB", path="/etc/default/grub", text=r'^GRUB_CMDLINE_LINUX="((?!.*ipv6\.disable=1).*)"$', replace=r'GRUB_CMDLINE_LINUX="\1 ipv6.disable=1"', _sudo=True ) server.shell( name="Update GRUB", commands=["update-grub"], _sudo=True ) Loading
deploy/pyinfra/lib/operations/kernel.py +15 −0 Original line number Diff line number Diff line Loading @@ -69,3 +69,18 @@ systemd.daemon_reload( name="Reload systemd", _sudo=True ) # Disable IPv6 at the kernel level via GRUB files.replace( name="Disable IPv6 in GRUB", path="/etc/default/grub", text=r'^GRUB_CMDLINE_LINUX="((?!.*ipv6\.disable=1).*)"$', replace=r'GRUB_CMDLINE_LINUX="\1 ipv6.disable=1"', _sudo=True ) server.shell( name="Update GRUB", commands=["update-grub"], _sudo=True )
deploy/pyinfra/tasks/system/kernel.py +15 −0 Original line number Diff line number Diff line Loading @@ -68,3 +68,18 @@ systemd.daemon_reload( name="Reload systemd", _sudo=True ) # Disable IPv6 at the kernel level via GRUB files.replace( name="Disable IPv6 in GRUB", path="/etc/default/grub", text=r'^GRUB_CMDLINE_LINUX="((?!.*ipv6\.disable=1).*)"$', replace=r'GRUB_CMDLINE_LINUX="\1 ipv6.disable=1"', _sudo=True ) server.shell( name="Update GRUB", commands=["update-grub"], _sudo=True )