summaryrefslogtreecommitdiff
path: root/cloud-init.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2010-03-02 14:10:55 -0500
committerScott Moser <smoser@ubuntu.com>2010-03-02 14:10:55 -0500
commit91e423a36928ee5ea52de0b6836d0c34cc20fdd2 (patch)
tree4a60cdf0eb60da0b5c8132388bc7e7ef275df80e /cloud-init.py
parent385802bf3396b149cfd61e20ea4c7e2c7974b307 (diff)
downloadvyos-cloud-init-91e423a36928ee5ea52de0b6836d0c34cc20fdd2.tar.gz
vyos-cloud-init-91e423a36928ee5ea52de0b6836d0c34cc20fdd2.zip
purge cache in cloud-init so it doesn't end up persisting across instances
The cache file location is not instance specific. As such, if it is not cleaned from the image, a re-bundle would get the old data. To avoid that, clear the cache in cloud-init.
Diffstat (limited to 'cloud-init.py')
-rwxr-xr-xcloud-init.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cloud-init.py b/cloud-init.py
index 1db2ea60..c92f07cd 100755
--- a/cloud-init.py
+++ b/cloud-init.py
@@ -26,6 +26,9 @@ def warn(str):
sys.stderr.write(str)
def main():
+ # cache is not instance specific, so it has to be purged
+ cloudinit.purge_cache()
+
cloud = cloudinit.CloudInit()
try: