Commit eaa5cfd5 authored by Muhammad Umair Khan's avatar Muhammad Umair Khan
Browse files

Bug Fix PyInfra: Disable IPV6

parent 820a89a6
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -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
)
+15 −0
Original line number Diff line number Diff line
@@ -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
)