I'm currently trying to append this line to the end of a file
zone_text = 'zone \"domain.com\" { type master; file \"/etc/bind/zones/domain.com\";};' add_zone_file = subprocess.Popen( ['ssh', NAMESERVERS[0], '/bin/echo', '"{}"'.format(zone_text), '>>', '/etc/bind/named.conf.local'], stdout=subprocess.PIPE ) But when I inspect the file it outputs this into it
zone domain.com { type master; file /etc/bind/zones/domain.com;}; And I need it to output this
zone "domain.com" { type master; file "/etc/bind/zones/domain.com";};