Loading deploy/pyinfra/lib/operations/kubernetes.py +4 −3 Changes for deploy/pyinfra/lib/operations/kubernetes.py: 4 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -37,8 +37,9 @@ class ReachableDnsServers(FactBase): return [] def command(self, servers): return ( "python3 - " + " ".join(servers) + " <<'EOF'\n" # No heredoc: pyinfra wraps the command in "(...)" for requires_command, # which would put ")" on the terminator line and break the heredoc script = ( "import socket, struct, sys\n" "query = struct.pack('>HHHHHH', 0x4d45, 0x0100, 1, 0, 0, 0)\n" "query += b''.join(bytes([len(p)]) + p.encode() for p in 'github.com'.split('.'))\n" Loading @@ -52,8 +53,8 @@ class ReachableDnsServers(FactBase): " print(server)\n" " except OSError:\n" " pass\n" "EOF" ) return "python3 -c " + shlex.quote(script) + " " + " ".join(shlex.quote(s) for s in servers) def process(self, output): return [line.strip() for line in output if line.strip()] Loading go-apps/meepctl/cmd/deploy.go +1 −1 File changed.Contains only whitespace changes. Show changes Loading
deploy/pyinfra/lib/operations/kubernetes.py +4 −3 Changes for deploy/pyinfra/lib/operations/kubernetes.py: 4 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -37,8 +37,9 @@ class ReachableDnsServers(FactBase): return [] def command(self, servers): return ( "python3 - " + " ".join(servers) + " <<'EOF'\n" # No heredoc: pyinfra wraps the command in "(...)" for requires_command, # which would put ")" on the terminator line and break the heredoc script = ( "import socket, struct, sys\n" "query = struct.pack('>HHHHHH', 0x4d45, 0x0100, 1, 0, 0, 0)\n" "query += b''.join(bytes([len(p)]) + p.encode() for p in 'github.com'.split('.'))\n" Loading @@ -52,8 +53,8 @@ class ReachableDnsServers(FactBase): " print(server)\n" " except OSError:\n" " pass\n" "EOF" ) return "python3 -c " + shlex.quote(script) + " " + " ".join(shlex.quote(s) for s in servers) def process(self, output): return [line.strip() for line in output if line.strip()] Loading