mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 05:31:22 -03:30
Shift default Azure cache directory from /tmp to ~
This commit is contained in:
parent
0a0844f40e
commit
674e895d0a
@ -72,8 +72,10 @@ class AzureInventory(object):
|
||||
self.parse_cli_args()
|
||||
|
||||
# Cache setting defaults.
|
||||
self.cache_path_cache = '/tmp/ansible-azure.cache'
|
||||
self.cache_path_index = '/tmp/ansible-azure.index'
|
||||
# These can be overridden in settings (see `read_settings`).
|
||||
cache_dir = os.path.expanduser('~')
|
||||
self.cache_path_cache = '%s/.ansible-azure.cache' % cache_dir
|
||||
self.cache_path_index = '%s/.ansible-azure.index' % cache_dir
|
||||
self.cache_max_age = 0
|
||||
|
||||
# Initialize Azure ServiceManagementService
|
||||
@ -159,8 +161,8 @@ class AzureInventory(object):
|
||||
# Cache related
|
||||
if config.has_option('azure', 'cache_path'):
|
||||
cache_path = config.get('azure', 'cache_path')
|
||||
self.cache_path_cache = cache_path + "/ansible-azure.cache"
|
||||
self.cache_path_index = cache_path + "/ansible-azure.index"
|
||||
self.cache_path_cache = cache_path + '/ansible-azure.cache'
|
||||
self.cache_path_index = cache_path + '/ansible-azure.index'
|
||||
if config.has_option('azure', 'cache_max_age'):
|
||||
self.cache_max_age = config.getint('azure', 'cache_max_age')
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user