diff options
author | Andy Boyett <andy.boyett@gmail.com> | 2016-03-24 02:18:43 -0700 |
---|---|---|
committer | Andy Boyett <andy.boyett@gmail.com> | 2016-03-24 02:28:42 -0700 |
commit | a75d8d49704b59c34ba5a6f1d12f1ebf37fcc9cf (patch) | |
tree | 63c4ac097b55c35ea0c85752ffb09d20c7c06382 /foreman_ansible_inventory.py | |
parent | 93725a56e52eb5abf89db23428a50a23d27f361f (diff) |
expand the use of '~' in cache path location
Apply a bit more intelligence to the config parser. This allows the
cache files to be anchored within a homedir.
[cache]
path = ~/.ansible/tmp
Diffstat (limited to 'foreman_ansible_inventory.py')
-rwxr-xr-x[-rw-r--r--] | foreman_ansible_inventory.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/foreman_ansible_inventory.py b/foreman_ansible_inventory.py index 461146c..e2a53c3 100644..100755 --- a/foreman_ansible_inventory.py +++ b/foreman_ansible_inventory.py @@ -107,7 +107,7 @@ class ForemanInventory(object): # Cache related try: - cache_path = config.get('cache', 'path') + cache_path = os.path.expanduser(config.get('cache', 'path')) except (ConfigParser.NoOptionError, ConfigParser.NoSectionError): cache_path = '.' (script, ext) = os.path.splitext(os.path.basename(__file__)) |