Merge "Zero out the inventory cache instead of removing it"

This commit is contained in:
Jenkins 2016-03-10 14:50:22 +00:00 committed by Gerrit Code Review
commit 61f0dc05b3
2 changed files with 7 additions and 5 deletions

View File

@ -256,10 +256,12 @@ def main():
options.network, options.boot_from_volume,
options.config_drive)
dns.print_dns(cloud, server)
# Remove the ansible inventory cache so that next run finds the new
# server
if os.path.exists('/var/cache/ansible-inventory/ansible-inventory.cache'):
os.unlink('/var/cache/ansible-inventory/ansible-inventory.cache')
# Zero the ansible inventory cache so that next run finds the new server
inventory_cache = '/var/cache/ansible-inventory/ansible-inventory.cache'
if os.path.exists(inventory_cache):
with open(inventory_cache, 'w'):
pass
os.system('/usr/local/bin/expand-groups.sh')
if __name__ == '__main__':

View File

@ -227,7 +227,7 @@ class openstack_project::puppetmaster (
vcsrepo { '/opt/ansible':
ensure => latest,
provider => git,
revision => 'stable-2.0',
revision => 'devel',
source => 'https://github.com/ansible/ansible',
}