mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #33564 from druonysus/suse-os-family
simple fix - change Suse to SUSE
This commit is contained in:
commit
3c49beaa57
@ -2434,7 +2434,7 @@ zypper install salt salt\-minion salt\-master
|
||||
.fi
|
||||
.UNINDENT
|
||||
.UNINDENT
|
||||
.SS Suse Linux Enterprise
|
||||
.SS SUSE Linux Enterprise
|
||||
.sp
|
||||
For SLE 12 run the following as root:
|
||||
.INDENT 0.0
|
||||
@ -15972,8 +15972,8 @@ describes the package. An example of this file is:
|
||||
.nf
|
||||
.ft C
|
||||
name: apache
|
||||
os: RedHat, Debian, Ubuntu, Suse, FreeBSD
|
||||
os_family: RedHat, Debian, Suse, FreeBSD
|
||||
os: RedHat, Debian, Ubuntu, SUSE, FreeBSD
|
||||
os_family: RedHat, Debian, SUSE, FreeBSD
|
||||
version: 201506
|
||||
release: 2
|
||||
summary: Formula for installing Apache
|
||||
@ -40629,7 +40629,7 @@ channels:
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.IP \(bu 2
|
||||
\fI\%OpenSuse Build Service\fP
|
||||
\fI\%openSUSE Build Service\fP
|
||||
.UNINDENT
|
||||
.sp
|
||||
Optionally WinRM can be used instead of \fIwinexe\fP if the python module \fIpywinrm\fP
|
||||
@ -232592,7 +232592,7 @@ repo. Secondly, it will be the name of the file as stored in
|
||||
.TP
|
||||
.B humanname
|
||||
This is used as the "name" value in the repo file in
|
||||
\fB/etc/yum.repos.d/\fP (or \fB/etc/zypp/repos.d\fP for Suse distros).
|
||||
\fB/etc/yum.repos.d/\fP (or \fB/etc/zypp/repos.d\fP for SUSE distros).
|
||||
.TP
|
||||
.B baseurl
|
||||
The URL to a yum repository
|
||||
@ -281393,7 +281393,7 @@ as improved error checking for sls files in the state system. A new provider
|
||||
system has been added to allow for redirecting what modules run in the
|
||||
background for individual states.
|
||||
.sp
|
||||
Support for OpenSUSE has been added and support for Solaris has begun
|
||||
Support for openSUSE has been added and support for Solaris has begun
|
||||
serious development. Windows support has been significantly enhanced as well.
|
||||
.sp
|
||||
The matcher and target systems have received a great deal of attention. The
|
||||
@ -281749,7 +281749,7 @@ The \fBpkg\fP module on Debian, Ubuntu,
|
||||
and derivatives force apt to run in a non\-interactive mode. This prevents
|
||||
issues when package installation waits for confirmation.
|
||||
.sp
|
||||
A \fBpkg\fP module for OpenSUSE\(aqs
|
||||
A \fBpkg\fP module for openSUSE\(aqs
|
||||
zypper was added.
|
||||
.sp
|
||||
The \fBservice\fP module on Ubuntu
|
||||
|
@ -28,7 +28,7 @@ channels:
|
||||
|
||||
.. __: http://rpm.pbone.net/index.php3?stat=3&search=winexe
|
||||
|
||||
* `OpenSuse Build Service`__
|
||||
* `openSUSE Build Service`__
|
||||
|
||||
.. __: http://software.opensuse.org/package/winexe
|
||||
|
||||
|
@ -137,7 +137,7 @@ For openSUSE 13.2 run the following as root:
|
||||
zypper refresh
|
||||
zypper install salt salt-minion salt-master
|
||||
|
||||
Suse Linux Enterprise
|
||||
SUSE Linux Enterprise
|
||||
---------------------
|
||||
|
||||
For SLE 12 run the following as root:
|
||||
|
@ -26,7 +26,7 @@ as improved error checking for sls files in the state system. A new provider
|
||||
system has been added to allow for redirecting what modules run in the
|
||||
background for individual states.
|
||||
|
||||
Support for OpenSUSE has been added and support for Solaris has begun
|
||||
Support for openSUSE has been added and support for Solaris has begun
|
||||
serious development. Windows support has been significantly enhanced as well.
|
||||
|
||||
The matcher and target systems have received a great deal of attention. The
|
||||
@ -339,7 +339,7 @@ The :doc:`pkg </ref/modules/all/salt.modules.aptpkg>` module on Debian, Ubuntu,
|
||||
and derivatives force apt to run in a non-interactive mode. This prevents
|
||||
issues when package installation waits for confirmation.
|
||||
|
||||
A :doc:`pkg </ref/modules/all/salt.modules.zypper>` module for OpenSUSE's
|
||||
A :doc:`pkg </ref/modules/all/salt.modules.zypper>` module for openSUSE's
|
||||
zypper was added.
|
||||
|
||||
The :doc:`service </ref/modules/all/salt.modules.upstart>` module on Ubuntu
|
||||
|
@ -10,8 +10,8 @@ describes the package. An example of this file is:
|
||||
.. code-block:: yaml
|
||||
|
||||
name: apache
|
||||
os: RedHat, Debian, Ubuntu, Suse, FreeBSD
|
||||
os_family: RedHat, Debian, Suse, FreeBSD
|
||||
os: RedHat, Debian, Ubuntu, SUSE, FreeBSD
|
||||
os_family: RedHat, Debian, SUSE, FreeBSD
|
||||
version: 201506
|
||||
release: 2
|
||||
summary: Formula for installing Apache
|
||||
|
@ -52,7 +52,7 @@ Turning on the Salt Master is easy -- just turn it on! The default configuration
|
||||
is suitable for the vast majority of installations. The Salt Master can be
|
||||
controlled by the local Linux/Unix service manager:
|
||||
|
||||
On Systemd based platforms (newer Debian, OpenSuse, Fedora):
|
||||
On Systemd based platforms (newer Debian, openSUSE, Fedora):
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
@ -15,9 +15,9 @@ index cfafe24..d581916 100644
|
||||
@@ -47,7 +47,7 @@ def __virtual__():
|
||||
if __grains__['kernel'] != 'Linux':
|
||||
return False
|
||||
# Suse >=12.0 uses systemd
|
||||
# SUSE >=12.0 uses systemd
|
||||
- if __grains__.get('os', '') == 'openSUSE':
|
||||
+ if __grains__.get('os_family', '') == 'Suse':
|
||||
+ if __grains__.get('os_family', '') == 'SUSE':
|
||||
try:
|
||||
if int(__grains__.get('osrelease', '').split('.')[0]) >= 12:
|
||||
return False
|
||||
|
@ -13,8 +13,8 @@ index d581916..dab0817 100644
|
||||
--- a/salt/modules/service.py
|
||||
+++ b/salt/modules/service.py
|
||||
@@ -49,7 +49,12 @@ def __virtual__():
|
||||
# Suse >=12.0 uses systemd
|
||||
if __grains__.get('os_family', '') == 'Suse':
|
||||
# SUSE >=12.0 uses systemd
|
||||
if __grains__.get('os_family', '') == 'SUSE':
|
||||
try:
|
||||
- if int(__grains__.get('osrelease', '').split('.')[0]) >= 12:
|
||||
+ # osrelease might be in decimal format (e.g. "12.1"), or for
|
||||
|
@ -81,7 +81,7 @@ Tue Apr 9 18:56:15 UTC 2013 - aboe76@gmail.com
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 30 21:00:43 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- Updated spec file with Suse Copyright
|
||||
- Updated spec file with SUSE Copyright
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 26 09:19:19 UTC 2013 - aboe76@gmail.com
|
||||
|
@ -1321,7 +1321,7 @@ Thu Feb 14 06:43:08 UTC 2013 - aboe76@gmail.com
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 30 20:57:57 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- Updated Suse Copyright in Spec-file
|
||||
- Updated SUSE Copyright in Spec-file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 28 15:23:08 UTC 2013 - toddrme2178@gmail.com
|
||||
|
@ -5152,7 +5152,7 @@ install_opensuse_stable_deps() {
|
||||
# shellcheck disable=SC2086
|
||||
__zypper_install ${__PACKAGES} || return 1
|
||||
|
||||
# Fix for OpenSUSE 13.2 and 2015.8 - gcc should not be required. Work around until package is fixed by SuSE
|
||||
# Fix for openSUSE 13.2 and 2015.8 - gcc should not be required. Work around until package is fixed by SuSE
|
||||
_EXTRA_PACKAGES="${_EXTRA_PACKAGES} gcc python-devel libgit2-devel"
|
||||
|
||||
if [ "${_EXTRA_PACKAGES}" != "" ]; then
|
||||
|
@ -1030,14 +1030,14 @@ _OS_FAMILY_MAP = {
|
||||
'VMwareESX': 'VMware',
|
||||
'Bluewhite64': 'Bluewhite',
|
||||
'Slamd64': 'Slackware',
|
||||
'SLES': 'Suse',
|
||||
'SUSE Enterprise Server': 'Suse',
|
||||
'SUSE Enterprise Server': 'Suse',
|
||||
'SLED': 'Suse',
|
||||
'openSUSE': 'Suse',
|
||||
'SUSE': 'Suse',
|
||||
'openSUSE Leap': 'Suse',
|
||||
'openSUSE Tumbleweed': 'Suse',
|
||||
'SLES': 'SUSE',
|
||||
'SUSE Enterprise Server': 'SUSE',
|
||||
'SUSE Enterprise Server': 'SUSE',
|
||||
'SLED': 'SUSE',
|
||||
'openSUSE': 'SUSE',
|
||||
'SUSE': 'SUSE',
|
||||
'openSUSE Leap': 'SUSE',
|
||||
'openSUSE Tumbleweed': 'SUSE',
|
||||
'Solaris': 'Solaris',
|
||||
'SmartOS': 'Solaris',
|
||||
'OpenIndiana Development': 'Solaris',
|
||||
|
@ -52,7 +52,7 @@ def _detect_os():
|
||||
os_family = __grains__['os_family']
|
||||
if os_family == 'RedHat':
|
||||
return 'apachectl'
|
||||
elif os_family == 'Debian' or os_family == 'Suse':
|
||||
elif os_family == 'Debian' or os_family == 'SUSE':
|
||||
return 'apache2ctl'
|
||||
else:
|
||||
return 'apachectl'
|
||||
|
@ -74,7 +74,7 @@ class Inspector(object):
|
||||
'''
|
||||
if self.grains_core.os_data().get('os_family') == 'Debian':
|
||||
return self.__get_cfg_pkgs_dpkg()
|
||||
elif self.grains_core.os_data().get('os_family') in ['Suse', 'redhat']:
|
||||
elif self.grains_core.os_data().get('os_family') in ['SUSE', 'redhat']:
|
||||
return self.__get_cfg_pkgs_rpm()
|
||||
else:
|
||||
return dict()
|
||||
@ -150,7 +150,7 @@ class Inspector(object):
|
||||
if self.grains_core.os_data().get('os_family') == 'Debian':
|
||||
cfg_data = salt.utils.to_str(self._syscall("dpkg", None, None, '--verify',
|
||||
pkg_name)[0]).split(os.linesep)
|
||||
elif self.grains_core.os_data().get('os_family') in ['Suse', 'redhat']:
|
||||
elif self.grains_core.os_data().get('os_family') in ['SUSE', 'redhat']:
|
||||
cfg_data = salt.utils.to_str(self._syscall("rpm", None, None, '-V', '--nodeps', '--nodigest',
|
||||
'--nosignature', '--nomtime', '--nolinkto',
|
||||
pkg_name)[0]).split(os.linesep)
|
||||
@ -209,7 +209,7 @@ class Inspector(object):
|
||||
'''
|
||||
if self.grains_core.os_data().get('os_family') == 'Debian':
|
||||
return self.__get_managed_files_dpkg()
|
||||
elif self.grains_core.os_data().get('os_family') in ['Suse', 'redhat']:
|
||||
elif self.grains_core.os_data().get('os_family') in ['SUSE', 'redhat']:
|
||||
return self.__get_managed_files_rpm()
|
||||
|
||||
return list(), list(), list()
|
||||
|
@ -80,7 +80,7 @@ def _conf(family='ipv4'):
|
||||
return '/var/lib/ip6tables/rules-save'
|
||||
else:
|
||||
return '/var/lib/iptables/rules-save'
|
||||
elif __grains__['os_family'] == 'Suse':
|
||||
elif __grains__['os_family'] == 'SUSE':
|
||||
# SuSE does not seem to use separate files for IPv4 and IPv6
|
||||
return '/etc/sysconfig/scripts/SuSEfirewall2-custom'
|
||||
else:
|
||||
|
@ -132,7 +132,7 @@ def get_locale():
|
||||
return params.get('LANG', '')
|
||||
elif 'RedHat' in __grains__['os_family']:
|
||||
cmd = 'grep "^LANG=" /etc/sysconfig/i18n'
|
||||
elif 'Suse' in __grains__['os_family']:
|
||||
elif 'SUSE' in __grains__['os_family']:
|
||||
cmd = 'grep "^RC_LANG" /etc/sysconfig/language'
|
||||
elif 'Debian' in __grains__['os_family']:
|
||||
# this block only applies to Debian without systemd
|
||||
@ -172,7 +172,7 @@ def set_locale(locale):
|
||||
'LANG="{0}"'.format(locale),
|
||||
append_if_not_found=True
|
||||
)
|
||||
elif 'Suse' in __grains__['os_family']:
|
||||
elif 'SUSE' in __grains__['os_family']:
|
||||
if not __salt__['file.file_exists']('/etc/sysconfig/language'):
|
||||
__salt__['file.touch']('/etc/sysconfig/language')
|
||||
__salt__['file.replace'](
|
||||
@ -261,7 +261,7 @@ def gen_locale(locale, **kwargs):
|
||||
on_debian = __grains__.get('os') == 'Debian'
|
||||
on_ubuntu = __grains__.get('os') == 'Ubuntu'
|
||||
on_gentoo = __grains__.get('os_family') == 'Gentoo'
|
||||
on_suse = __grains__.get('os_family') == 'Suse'
|
||||
on_suse = __grains__.get('os_family') == 'SUSE'
|
||||
on_solaris = __grains__.get('os_family') == 'Solaris'
|
||||
|
||||
if on_solaris: # all locales are pre-generated
|
||||
|
@ -51,8 +51,8 @@ def __virtual__():
|
||||
# Disable on all non-Linux OSes as well
|
||||
if __grains__['kernel'] != 'Linux':
|
||||
return (False, 'Non Linux OSes are not supported')
|
||||
# Suse >=12.0 uses systemd
|
||||
if __grains__.get('os_family', '') == 'Suse':
|
||||
# SUSE >=12.0 uses systemd
|
||||
if __grains__.get('os_family', '') == 'SUSE':
|
||||
try:
|
||||
# osrelease might be in decimal format (e.g. "12.1"), or for
|
||||
# SLES might include service pack (e.g. "11 SP3"), so split on
|
||||
@ -60,7 +60,7 @@ def __virtual__():
|
||||
# number (it'd be so much simpler if it was always "X.Y"...)
|
||||
import re
|
||||
if int(re.split(r'\D+', __grains__.get('osrelease', ''))[0]) >= 12:
|
||||
return (False, 'Suse version greater than or equal to 12 is not supported')
|
||||
return (False, 'SUSE version greater than or equal to 12 is not supported')
|
||||
except ValueError:
|
||||
return (False, 'You are missing the os_family grain')
|
||||
return 'service'
|
||||
|
@ -139,7 +139,7 @@ def get_zone():
|
||||
if __grains__['os'].lower() == 'centos':
|
||||
return _get_zone_etc_localtime()
|
||||
os_family = __grains__['os_family']
|
||||
for family in ('RedHat', 'Suse'):
|
||||
for family in ('RedHat', 'SUSE'):
|
||||
if family in os_family:
|
||||
return _get_zone_sysconfig()
|
||||
for family in ('Debian', 'Gentoo'):
|
||||
@ -218,7 +218,7 @@ def set_zone(timezone):
|
||||
if 'RedHat' in __grains__['os_family']:
|
||||
__salt__['file.sed'](
|
||||
'/etc/sysconfig/clock', '^ZONE=.*', 'ZONE="{0}"'.format(timezone))
|
||||
elif 'Suse' in __grains__['os_family']:
|
||||
elif 'SUSE' in __grains__['os_family']:
|
||||
__salt__['file.sed'](
|
||||
'/etc/sysconfig/clock', '^ZONE=.*', 'ZONE="{0}"'.format(timezone))
|
||||
elif 'Debian' in __grains__['os_family']:
|
||||
@ -312,7 +312,7 @@ def get_hwclock():
|
||||
|
||||
else:
|
||||
os_family = __grains__['os_family']
|
||||
for family in ('RedHat', 'Suse'):
|
||||
for family in ('RedHat', 'SUSE'):
|
||||
if family in os_family:
|
||||
cmd = ['tail', '-n', '1', '/etc/adjtime']
|
||||
return __salt__['cmd.run'](cmd, python_shell=False)
|
||||
@ -401,7 +401,7 @@ def set_hwclock(clock):
|
||||
elif 'RedHat' in __grains__['os_family']:
|
||||
__salt__['file.sed'](
|
||||
'/etc/sysconfig/clock', '^ZONE=.*', 'ZONE="{0}"'.format(timezone))
|
||||
elif 'Suse' in __grains__['os_family']:
|
||||
elif 'SUSE' in __grains__['os_family']:
|
||||
__salt__['file.sed'](
|
||||
'/etc/sysconfig/clock', '^ZONE=.*', 'ZONE="{0}"'.format(timezone))
|
||||
elif 'Debian' in __grains__['os_family']:
|
||||
|
@ -54,9 +54,9 @@ def __virtual__():
|
||||
'''
|
||||
Set the virtual pkg module if the os is openSUSE
|
||||
'''
|
||||
if __grains__.get('os_family', '') != 'Suse':
|
||||
if __grains__.get('os_family', '') != 'SUSE':
|
||||
return (False, "Module zypper: non SUSE OS not suppored by zypper package manager")
|
||||
# Not all versions of Suse use zypper, check that it is available
|
||||
# Not all versions of SUSE use zypper, check that it is available
|
||||
if not salt.utils.which('zypper'):
|
||||
return (False, "Module zypper: zypper package manager not found")
|
||||
return __virtualname__
|
||||
|
@ -128,7 +128,7 @@ def managed(name, ppa=None, **kwargs):
|
||||
|
||||
humanname
|
||||
This is used as the "name" value in the repo file in
|
||||
``/etc/yum.repos.d/`` (or ``/etc/zypp/repos.d`` for Suse distros).
|
||||
``/etc/yum.repos.d/`` (or ``/etc/zypp/repos.d`` for SUSE distros).
|
||||
|
||||
baseurl
|
||||
The URL to a yum repository
|
||||
|
@ -652,7 +652,7 @@ def get_ca_bundle(opts=None):
|
||||
'/etc/pki/tls/certs/ca-bundle.trust.crt',
|
||||
# RedHat's link for Debian compatibility
|
||||
'/etc/ssl/certs/ca-bundle.crt',
|
||||
# Suse has an unusual path
|
||||
# SUSE has an unusual path
|
||||
'/var/lib/ca-certificates/ca-bundle.pem',
|
||||
# OpenBSD has an unusual path
|
||||
'/etc/ssl/cert.pem',
|
||||
|
@ -220,7 +220,7 @@ class PkgModuleTest(integration.ModuleCase,
|
||||
keys = ret.keys()
|
||||
self.assertIn('rpm', keys)
|
||||
self.assertIn('yum', keys)
|
||||
elif os_family == 'Suse':
|
||||
elif os_family == 'SUSE':
|
||||
ret = self.run_function(func, ['less', 'zypper'])
|
||||
keys = ret.keys()
|
||||
self.assertIn('less', keys)
|
||||
|
@ -58,7 +58,7 @@ class UseraddModuleTest(integration.ModuleCase):
|
||||
|
||||
try:
|
||||
uinfo = self.run_function('user.info', [uname])
|
||||
if grains['os_family'] in ('Suse',):
|
||||
if grains['os_family'] in ('SUSE',):
|
||||
self.assertIn('users', uinfo['groups'])
|
||||
else:
|
||||
self.assertIn(uname, uinfo['groups'])
|
||||
|
@ -36,7 +36,7 @@ _PKG_TARGETS = {
|
||||
'Debian': ['python-plist', 'apg'],
|
||||
'RedHat': ['xz-devel', 'zsh-html'],
|
||||
'FreeBSD': ['aalib', 'pth'],
|
||||
'Suse': ['aalib', 'python-pssh']
|
||||
'SUSE': ['aalib', 'python-pssh']
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@ _PKG_TARGETS = {
|
||||
'Debian': ['python-plist', 'apg'],
|
||||
'RedHat': ['xz-devel', 'zsh-html'],
|
||||
'FreeBSD': ['aalib', 'pth'],
|
||||
'Suse': ['aalib', 'python-pssh'],
|
||||
'SUSE': ['aalib', 'python-pssh'],
|
||||
'MacOS': ['libpng', 'jpeg'],
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ class UserTest(integration.ModuleCase,
|
||||
group_name = grp.getgrgid(ret['gid']).gr_name
|
||||
|
||||
self.assertTrue(os.path.isdir('/var/lib/salt_test'))
|
||||
if grains['os_family'] in ('Suse',):
|
||||
if grains['os_family'] in ('SUSE',):
|
||||
self.assertEqual(group_name, 'users')
|
||||
elif grains['os_family'] == 'MacOS':
|
||||
self.assertEqual(group_name, 'staff')
|
||||
|
Loading…
Reference in New Issue
Block a user