diff --git a/doc/ref/modules/all/salt.modules.linux_shadow.rst b/doc/ref/modules/all/salt.modules.linux_shadow.rst new file mode 100644 index 000000000000..5edc575f1040 --- /dev/null +++ b/doc/ref/modules/all/salt.modules.linux_shadow.rst @@ -0,0 +1,6 @@ +========================= +salt.modules.linux_shadow +========================= + +.. automodule:: salt.modules.linux_shadow + :members: diff --git a/doc/ref/modules/all/salt.modules.shadow.rst b/doc/ref/modules/all/salt.modules.shadow.rst index 3b03032d28eb..1ecbc5786621 100644 --- a/doc/ref/modules/all/salt.modules.shadow.rst +++ b/doc/ref/modules/all/salt.modules.shadow.rst @@ -13,7 +13,7 @@ modules: ====================================== ======================================== Execution Module Used for ====================================== ======================================== -:py:mod:`~salt.modules.shadow` Linux +:py:mod:`~salt.modules.linux_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 diff --git a/salt/modules/shadow.py b/salt/modules/linux_shadow.py similarity index 98% rename from salt/modules/shadow.py rename to salt/modules/linux_shadow.py index 88d817255c4c..febef330c3d6 100644 --- a/salt/modules/shadow.py +++ b/salt/modules/linux_shadow.py @@ -30,9 +30,11 @@ except ImportError: HAS_CRYPT = False +__virtualname__ = 'shadow' + def __virtual__(): - return __grains__.get('kernel', '') == 'Linux' + return __virtualname__ if __grains__.get('kernel', '') == 'Linux' else False def default_hash(): diff --git a/tests/integration/modules/test_shadow.py b/tests/integration/modules/test_linux_shadow.py similarity index 98% rename from tests/integration/modules/test_shadow.py rename to tests/integration/modules/test_linux_shadow.py index 933f67532ee8..9ecfac189957 100644 --- a/tests/integration/modules/test_shadow.py +++ b/tests/integration/modules/test_linux_shadow.py @@ -17,7 +17,7 @@ # Import Salt libs import salt.utils.files import salt.utils.platform -import salt.modules.shadow +import salt.modules.linux_shadow as shadow from salt.ext.six.moves import range @@ -45,7 +45,7 @@ def setUp(self): ) self._test_user = self.__random_string() self._no_user = self.__random_string() - self._password = salt.modules.shadow.gen_password('Password1234') + self._password = shadow.gen_password('Password1234') def __random_string(self, size=6): '''