2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-02-10 15:55:27 +00:00

Tighten umask on confignet to avoid ubuntu warnings

This commit is contained in:
Jarrod Johnson 2024-07-23 10:14:32 -04:00
parent bb04faed04
commit a94b9235e8

View File

@ -192,8 +192,10 @@ class NetplanManager(object):
if needcfgwrite:
needcfgapply = True
newcfg = {'network': {'version': 2, 'ethernets': {devname: self.cfgbydev[devname]}}}
oumask = os.umask(0o77)
with open('/etc/netplan/{0}-confluentcfg.yaml'.format(devname), 'w') as planout:
planout.write(yaml.dump(newcfg))
os.umask(oumask)
if needcfgapply:
subprocess.call(['netplan', 'apply'])