Move the tables of virtual modules to individual documentation pages

This commit is contained in:
Erik Johnson 2016-04-08 21:58:11 -05:00
parent 690addf0b4
commit f0de1236ec
6 changed files with 140 additions and 129 deletions

View file

@ -0,0 +1,24 @@
.. _virtual-group:
==================
salt.modules.group
==================
.. py:module:: salt.modules.group
:synopsis: A virtual module for group management
``group`` is a virtual module that is fulfilled by one of the following
modules:
====================================== ========================================
Execution Module Used for
====================================== ========================================
:py:mod:`~salt.modules.groupadd` Linux, NetBSD, and OpenBSD systems using
``groupadd(8)``, ``groupdel(8)``, and
``groupmod(8)``
:py:mod:`~salt.modules.pw_group` FreeBSD-based OSes using ``pw(8)``
:py:mod:`~salt.modules.solaris_group` Solaris-based OSes using
``groupadd(1M)``, ``groupdel(1M)``, and
``groupmod(1M)``
:py:mod:`~salt.modules.win_groupadd` Windows
====================================== ========================================

View file

@ -1,3 +1,5 @@
.. _virtual-pkg:
================
salt.modules.pkg
================
@ -7,16 +9,33 @@ salt.modules.pkg
``pkg`` is a virtual module that is fulfilled by one of the following modules:
* :mod:`salt.modules.aptpkg`
* :mod:`salt.modules.brew`
* :mod:`salt.modules.ebuild`
* :mod:`salt.modules.freebsdpkg`
* :mod:`salt.modules.openbsdpkg`
* :mod:`salt.modules.pacman`
* :mod:`salt.modules.pkgin`
* :mod:`salt.modules.pkgng`
* :mod:`salt.modules.pkgutil`
* :mod:`salt.modules.solarispkg`
* :mod:`salt.modules.win_pkg`
* :mod:`salt.modules.yumpkg`
* :mod:`salt.modules.zypper`
====================================== ========================================
Execution Module Used for
====================================== ========================================
:py:mod:`~salt.modules.aptpkg` Debian/Ubuntu-based distros which use
``apt-get(8)`` for package management
:py:mod:`~salt.modules.brew` Mac OS software management using
`Homebrew`_
:py:mod:`~salt.modules.ebuild` Gentoo-based systems (utilizes the
``portage`` python module as well as
``emerge(1)``)
:py:mod:`~salt.modules.freebsdpkg` FreeBSD-based OSes using ``pkg_add(1)``
:py:mod:`~salt.modules.openbsdpkg` OpenBSD-based OSes using ``pkg_add(1)``
:py:mod:`~salt.modules.pacman` Arch Linux-based distros using
``pacman(8)``
:py:mod:`~salt.modules.pkgin` NetBSD-based OSes using ``pkgin(1)``
:py:mod:`~salt.modules.pkgng` FreeBSD-based OSes using ``pkg(8)``
:py:mod:`~salt.modules.pkgutil` Solaris-based OSes using `OpenCSW`_'s
``pkgutil(1)``
:py:mod:`~salt.modules.solarispkg` Solaris-based OSes using ``pkgadd(1M)``
:py:mod:`~salt.modules.solarisips` Solaris-based OSes using IPS ``pkg(1)``
:py:mod:`~salt.modules.win_pkg` Salt's :ref:`Windows Package Manager
<windows-package-manager`
:py:mod:`~salt.modules.yumpkg` RedHat-based distros and derivatives
using ``yum(8)`` or ``dnf(8)``
:py:mod:`~salt.modules.zypper` SUSE-based distros using ``zypper(8)``
====================================== ========================================
.. _Homebrew: http://brew.sh/
.. _OpenCSW: http://www.opencsw.org/

View file

@ -1,6 +1,39 @@
.. _virtual-service:
====================
salt.modules.service
====================
.. py:module:: salt.modules.service
:synopsis: A virtual module for service management
``service`` is a virtual module that is fulfilled by one of the following
modules:
====================================== ========================================
Execution Module Used for
====================================== ========================================
:py:mod:`~salt.modules.debian_service` Debian Wheezy and earlier
:py:mod:`~salt.modules.freebsdservice` FreeBSD-based OSes using ``service(8)``
:py:mod:`~salt.modules.gentoo_service` Gentoo Linux using ``sysvinit`` and
``rc-update(8)``
:py:mod:`~salt.modules.launchctl` Mac OS hosts using ``launchctl(1)``
:py:mod:`~salt.modules.netbsdservice` NetBSD-based OSes
:py:mod:`~salt.modules.openbsdservice` OpenBSD-based OSes
:py:mod:`~salt.modules.rh_service` RedHat-based distros and derivatives
using ``service(8)`` and
``chkconfig(8)``. Supports both pure
sysvinit and mixed sysvinit/upstart
systems.
:py:mod:`~salt.modules.service` Fallback which simply wraps sysvinit
scripts
:py:mod:`~salt.modules.smf` Solaris-based OSes which use SMF
:py:mod:`~salt.modules.systemd` Linux distros which use systemd
:py:mod:`~salt.modules.upstart` Ubuntu-based distros using upstart
:py:mod:`~salt.modules.win_service` Windows
====================================== ========================================
|
.. automodule:: salt.modules.service
:members:
:members:

View file

@ -1,6 +1,26 @@
.. _virtual-shadow:
===================
salt.modules.shadow
===================
.. py:module:: salt.modules.shadow
:synopsis: A virtual module for shadow file / password management
``shadow`` is a virtual module that is fulfilled by one of the following
modules:
====================================== ========================================
Execution Module Used for
====================================== ========================================
:py:mod:`~salt.modules.shadow` Linux
:py:mod:`~salt.modules.bsd_shadow` FreeBSD, OpenBSD, NetBSD
:py:mod:`~salt.modules.solaris_shadow` Solaris-based OSes
:py:mod:`~salt.modules.win_shadow` Windows
====================================== ========================================
|
.. automodule:: salt.modules.shadow
:members:
:members:

View file

@ -0,0 +1,24 @@
.. _virtual-user:
=================
salt.modules.user
=================
.. py:module:: salt.modules.user
:synopsis: A virtual module for user management
``user`` is a virtual module that is fulfilled by one of the following modules:
====================================== ========================================
Execution Module Used for
====================================== ========================================
:py:mod:`~salt.modules.useradd` Linux, NetBSD, and OpenBSD systems using
``useradd(8)``, ``userdel(8)``, and
``usermod(8)``
:py:mod:`~salt.modules.pw_user` FreeBSD-based OSes using ``pw(8)``
:py:mod:`~salt.modules.solaris_user` Solaris-based OSes using
``useradd(1M)``, ``userdel(1M)``, and
``usermod(1M)``
:py:mod:`~salt.modules.mac_user` MacOS
:py:mod:`~salt.modules.win_useradd` Windows
====================================== ========================================

View file

@ -9,9 +9,9 @@ properties of a system. These determinations are generally made for modules
that provide things like package and service management.
Sometimes in states, it may be necessary to use an alternative module to
provide the needed functionality. For instance, an older Arch Linux system may
not be running systemd, so instead of using the systemd service module, you can
revert to the default service module:
provide the needed functionality. For instance, an very old Arch Linux system
may not be running systemd, so instead of using the systemd service module, you
can revert to the default service module:
.. code-block:: yaml
@ -26,116 +26,7 @@ manages :program:`sysvinit`-based services) will replace the
However, if it is necessary to make this override for most or every service,
it is better to just override the provider in the minion config file, as
described in the section below.
Setting a Provider in the Minion Config File
============================================
.. _`issue tracker`: https://github.com/saltstack/salt/issues
Sometimes, when running Salt on custom Linux spins, or distribution that are derived
from other distributions, Salt does not successfully detect providers. The providers
which are most likely to be affected by this are:
- pkg
- service
- user
- group
When something like this happens, rather than specifying the provider manually
in each state, it easier to use the :conf_minion:`providers` parameter in the
minion config file to set the provider.
If you end up needing to override a provider because it was not detected,
please let us know! File an issue on the `issue tracker`_, and provide the
output from the :mod:`grains.items <salt.modules.grains.items>` function,
taking care to sanitize any sensitive information.
Below are tables that should help with deciding which provider to use if one
needs to be overridden.
Provider: ``pkg``
*****************
======================= =======================================================
Execution Module Used for
======================= =======================================================
apt Debian/Ubuntu-based distros which use ``apt-get(8)``
for package management
brew Mac OS software management using `Homebrew`_
ebuild Gentoo-based systems (utilizes the ``portage`` python
module as well as ``emerge(1)``)
freebsdpkg FreeBSD-based OSes using ``pkg_add(1)``
openbsdpkg OpenBSD-based OSes using ``pkg_add(1)``
pacman Arch Linux-based distros using ``pacman(8)``
pkgin NetBSD-based OSes using ``pkgin(1)``
pkgng FreeBSD-based OSes using ``pkg(8)``
pkgutil Solaris-based OSes using `OpenCSW`_'s ``pkgutil(1)``
solarispkg Solaris-based OSes using ``pkgadd(1M)``
solarisips Solaris-based OSes using IPS ``pkg(1)``
win_pkg Windows
yumpkg RedHat-based distros and derivatives (wraps ``yum(8)``)
zypper SUSE-based distros using ``zypper(8)``
======================= =======================================================
.. _Homebrew: http://brew.sh/
.. _OpenCSW: http://www.opencsw.org/
Provider: ``service``
*********************
======================= =======================================================
Execution Module Used for
======================= =======================================================
debian_service Debian (non-systemd)
freebsdservice FreeBSD-based OSes using ``service(8)``
gentoo_service Gentoo Linux using :program:`sysvinit` and
``rc-update(8)``
launchctl Mac OS hosts using ``launchctl(1)``
netbsdservice NetBSD-based OSes
openbsdservice OpenBSD-based OSes
rh_service RedHat-based distros and derivatives using
``service(8)`` and ``chkconfig(8)``. Supports both
pure sysvinit and mixed sysvinit/upstart systems.
service Fallback which simply wraps sysvinit scripts
smf Solaris-based OSes which use SMF
systemd Linux distros which use systemd
upstart Ubuntu-based distros using upstart
win_service Windows
======================= =======================================================
Provider: ``user``
******************
======================= =======================================================
Execution Module Used for
======================= =======================================================
useradd Linux, NetBSD, and OpenBSD systems using
``useradd(8)``, ``userdel(8)``, and ``usermod(8)``
pw_user FreeBSD-based OSes using ``pw(8)``
solaris_user Solaris-based OSes using ``useradd(1M)``,
``userdel(1M)``, and ``usermod(1M)``
win_useradd Windows
======================= =======================================================
Provider: ``group``
*******************
======================= =======================================================
Execution Module Used for
======================= =======================================================
groupadd Linux, NetBSD, and OpenBSD systems using
``groupadd(8)``, ``groupdel(8)``, and ``groupmod(8)``
pw_group FreeBSD-based OSes using ``pw(8)``
solaris_group Solaris-based OSes using ``groupadd(1M)``,
``groupdel(1M)``, and ``groupmod(1M)``
win_groupadd Windows
======================= =======================================================
described :ref:`here <module-provider-override>`.
Arbitrary Module Redirects
==========================
@ -155,4 +46,4 @@ In this example, the state is being instructed to use a custom module to invoke
commands.
Arbitrary module redirects can be used to dramatically change the behavior of a
given state.
given state.