diff options
author | Joel Diaz <jdiaz@redhat.com> | 2015-12-16 15:59:26 -0500 |
---|---|---|
committer | Joel Diaz <jdiaz@redhat.com> | 2015-12-16 15:59:26 -0500 |
commit | c607f1ba93be5e9f16723074ff97ffd27b025f8c (patch) | |
tree | 57d78b69cd526a57ad0258ba468868561626f384 /inventory | |
parent | 4dfe16e0e567a633cedd8ee56ffaed5110ca1629 (diff) | |
parent | f826925c8217d5c9f150ef03ca8deb718c37c157 (diff) | |
download | openshift-c607f1ba93be5e9f16723074ff97ffd27b025f8c.tar.gz openshift-c607f1ba93be5e9f16723074ff97ffd27b025f8c.tar.bz2 openshift-c607f1ba93be5e9f16723074ff97ffd27b025f8c.tar.xz openshift-c607f1ba93be5e9f16723074ff97ffd27b025f8c.zip |
Merge pull request #1078 from joelddiaz/master
sync master -> prod
Diffstat (limited to 'inventory')
-rwxr-xr-x | inventory/multi_inventory.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/inventory/multi_inventory.py b/inventory/multi_inventory.py index 232f2402d..20fc48aa9 100755 --- a/inventory/multi_inventory.py +++ b/inventory/multi_inventory.py @@ -56,15 +56,6 @@ class MultiInventory(object): else: self.config_file = None # expect env vars - - def run(self): - '''This method checks to see if the local - cache is valid for the inventory. - - if the cache is valid; return cache - else the credentials are loaded from multi_inventory.yaml or from the env - and we attempt to get the inventory from the provider specified. - ''' # load yaml if self.config_file and os.path.isfile(self.config_file): self.config = self.load_yaml_config() @@ -91,6 +82,15 @@ class MultiInventory(object): if self.config.has_key('cache_location'): self.cache_path = self.config['cache_location'] + def run(self): + '''This method checks to see if the local + cache is valid for the inventory. + + if the cache is valid; return cache + else the credentials are loaded from multi_inventory.yaml or from the env + and we attempt to get the inventory from the provider specified. + ''' + if self.args.get('refresh_cache', None): self.get_inventory() self.write_to_cache() |