mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 09:51:09 +03:00
Merge pull request #451 from ryanpetrello/fix-7609
disable GCE inventory source cache
This commit is contained in:
commit
f84e42ed15
@ -176,6 +176,13 @@ class AnsibleInventoryLoader(object):
|
|||||||
def load(self):
|
def load(self):
|
||||||
base_args = self.get_base_args()
|
base_args = self.get_base_args()
|
||||||
logger.info('Reading Ansible inventory source: %s', self.source)
|
logger.info('Reading Ansible inventory source: %s', self.source)
|
||||||
|
|
||||||
|
# by default, the GCE inventory source caches results on disk for
|
||||||
|
# 5 minutes; disable this behavior
|
||||||
|
# https://github.com/ansible/tower/blob/cfb633e8a643b0190fa07b6204b339a1d336cbb3/awx/plugins/inventory/gce.py#L115
|
||||||
|
if self.source.endswith('gce.py'):
|
||||||
|
base_args += ['--refresh-cache']
|
||||||
|
|
||||||
data = self.command_to_json(base_args + ['--list'])
|
data = self.command_to_json(base_args + ['--list'])
|
||||||
|
|
||||||
# TODO: remove after we run custom scripts through ansible-inventory
|
# TODO: remove after we run custom scripts through ansible-inventory
|
||||||
|
Loading…
Reference in New Issue
Block a user