"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "salt/utils/icinga2.py" between
salt-2019.2.0.tar.gz and salt-2019.2.1.tar.gz

About: SaltStack is a systems management software for data center automation, cloud orchestration, server provisioning, configuration management and more. Community version.

icinga2.py  (salt-2019.2.0):icinga2.py  (salt-2019.2.1)
skipping to change at line 17 skipping to change at line 17
.. versionadded:: 2018.8.3 .. versionadded:: 2018.8.3
''' '''
# Import python libs # Import python libs
from __future__ import absolute_import, print_function, unicode_literals from __future__ import absolute_import, print_function, unicode_literals
import logging import logging
import re import re
# Import Salt libs # Import Salt libs
import salt.utils.path import salt.utils.path
import salt.modules.cmdmod
__salt__ = {
'cmd.run_all': salt.modules.cmdmod.run_all
}
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
def get_certs_path(): def get_certs_path():
icinga2_output = __salt__['cmd.run_all']([salt.utils.path.which('icinga2'), icinga2_output = __salt__['cmd.run_all']([salt.utils.path.which('icinga2'),
"--version"], python_shell=False) "--version"], python_shell=False)
version = re.search(r'r\d+\.\d+', icinga2_output['stdout']).group(0) version = re.search(r'r\d+\.\d+', icinga2_output['stdout']).group(0)
# Return new certs path for icinga2 >= 2.8 # Return new certs path for icinga2 >= 2.8
if int(version.split('.')[1]) >= 8: if int(version.split('.')[1]) >= 8:
return '/var/lib/icinga2/certs/' return '/var/lib/icinga2/certs/'
# Keep backwords compatibility with older icinga2 # Keep backwords compatibility with older icinga2
return '/etc/icinga2/pki/' return '/etc/icinga2/pki/'
 End of changes. 3 change blocks. 
2 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)