From cdead64021c852d80b1b2371a3e587d8abc9419c Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 9 Mar 2016 12:02:06 -0600 Subject: [PATCH] Zero out the inventory cache instead of removing it https://github.com/ansible/ansible/pull/14882 landed, so the inventory will understand that an empty cache means the inventory needs refetching. Zero out the file, and start consuming inventory from the master branch of ansible since mordred controls that file anyway. Change-Id: I2a4f4b21c50bfa94a229dd109e3d21f47552f0a1 --- launch/launch-node.py | 10 ++++++---- modules/openstack_project/manifests/puppetmaster.pp | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/launch/launch-node.py b/launch/launch-node.py index fd84aa89b2..3aaf6ee0be 100644 --- a/launch/launch-node.py +++ b/launch/launch-node.py @@ -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__': diff --git a/modules/openstack_project/manifests/puppetmaster.pp b/modules/openstack_project/manifests/puppetmaster.pp index 0ce6c31ded..5cb3285bb1 100644 --- a/modules/openstack_project/manifests/puppetmaster.pp +++ b/modules/openstack_project/manifests/puppetmaster.pp @@ -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', }