1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Handle case where .UNFONFIGURE file isn't there

This commit is contained in:
Paul Markham 2015-06-29 12:43:14 +10:00 committed by Matt Clay
parent 3610cf244e
commit 9073db0ee9

View file

@ -161,6 +161,7 @@ class Zone(object):
self.configure_ssh_keys() self.configure_ssh_keys()
def configure_sysid(self): def configure_sysid(self):
if os.path.isfile('%s/root/etc/.UNCONFIGURED' % self.path):
os.unlink('%s/root/etc/.UNCONFIGURED' % self.path) os.unlink('%s/root/etc/.UNCONFIGURED' % self.path)
open('%s/root/noautoshutdown' % self.path, 'w').close() open('%s/root/noautoshutdown' % self.path, 'w').close()