mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 09:57:35 -02:30
Shift default Azure cache directory from /tmp to ~
This commit is contained in:
@@ -72,8 +72,10 @@ class AzureInventory(object):
|
|||||||
self.parse_cli_args()
|
self.parse_cli_args()
|
||||||
|
|
||||||
# Cache setting defaults.
|
# Cache setting defaults.
|
||||||
self.cache_path_cache = '/tmp/ansible-azure.cache'
|
# These can be overridden in settings (see `read_settings`).
|
||||||
self.cache_path_index = '/tmp/ansible-azure.index'
|
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
|
self.cache_max_age = 0
|
||||||
|
|
||||||
# Initialize Azure ServiceManagementService
|
# Initialize Azure ServiceManagementService
|
||||||
@@ -159,8 +161,8 @@ class AzureInventory(object):
|
|||||||
# Cache related
|
# Cache related
|
||||||
if config.has_option('azure', 'cache_path'):
|
if config.has_option('azure', 'cache_path'):
|
||||||
cache_path = config.get('azure', 'cache_path')
|
cache_path = config.get('azure', 'cache_path')
|
||||||
self.cache_path_cache = cache_path + "/ansible-azure.cache"
|
self.cache_path_cache = cache_path + '/ansible-azure.cache'
|
||||||
self.cache_path_index = cache_path + "/ansible-azure.index"
|
self.cache_path_index = cache_path + '/ansible-azure.index'
|
||||||
if config.has_option('azure', 'cache_max_age'):
|
if config.has_option('azure', 'cache_max_age'):
|
||||||
self.cache_max_age = config.getint('azure', 'cache_max_age')
|
self.cache_max_age = config.getint('azure', 'cache_max_age')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user