mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Add config.option components to poudriere ex module
This commit is contained in:
parent
eb0733e497
commit
3a7c134bcb
@ -25,7 +25,9 @@ defaults = {'mongo.db': 'salt',
|
||||
'solr.dih.import_options': {'clean': False, 'optimize': True,
|
||||
'commit': True, 'verbose': False},
|
||||
'solr.backup_path': None,
|
||||
'solr.num_backups': 1
|
||||
'solr.num_backups': 1,
|
||||
'poudriere.config': '/usr/local/etc/poudriere.conf',
|
||||
'poudriere.config_dir': '/usr/local/etc/poudriere.d',
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,9 +1,12 @@
|
||||
'''
|
||||
Support for poudriere
|
||||
'''
|
||||
|
||||
# Import Python libs
|
||||
import os
|
||||
import logging
|
||||
|
||||
# Import Salt libs
|
||||
import salt.utils
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -23,22 +26,14 @@ def _config_file():
|
||||
'''
|
||||
Return the config file location to use
|
||||
'''
|
||||
if 'poudriere.config' in __opts__:
|
||||
return __opts__['poudriere.config']
|
||||
elif 'poudriere.config' in __pillar__:
|
||||
return __pillar__['poudriere.config']
|
||||
return '/usr/local/etc/poudriere.conf'
|
||||
return __salt__['config.option']('poudriere.config')
|
||||
|
||||
|
||||
def _config_dir():
|
||||
'''
|
||||
Return the configuration directory to use
|
||||
'''
|
||||
if 'poudriere.config' in __opts__:
|
||||
return __opts__['poudriere.config_dir']
|
||||
elif 'poudriere.config' in __pillar__:
|
||||
return __pillar__['poudriere.config_dir']
|
||||
return '/usr/local/etc/poudriere.d'
|
||||
return __salt__['config.option']('poudriere.config_dir')
|
||||
|
||||
|
||||
def _check_config_exists(config_file=None):
|
||||
|
Loading…
Reference in New Issue
Block a user