From 9073db0ee96a81a85b8f37952760550cde6d0d65 Mon Sep 17 00:00:00 2001 From: Paul Markham Date: Mon, 29 Jun 2015 12:43:14 +1000 Subject: [PATCH] Handle case where .UNFONFIGURE file isn't there --- lib/ansible/modules/extras/system/solaris_zone.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/system/solaris_zone.py b/lib/ansible/modules/extras/system/solaris_zone.py index bac448fcb8..54ab86eee2 100644 --- a/lib/ansible/modules/extras/system/solaris_zone.py +++ b/lib/ansible/modules/extras/system/solaris_zone.py @@ -161,7 +161,8 @@ class Zone(object): self.configure_ssh_keys() def configure_sysid(self): - os.unlink('%s/root/etc/.UNCONFIGURED' % self.path) + if os.path.isfile('%s/root/etc/.UNCONFIGURED' % self.path): + os.unlink('%s/root/etc/.UNCONFIGURED' % self.path) open('%s/root/noautoshutdown' % self.path, 'w').close()