userdetect


Nameuserdetect JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/Josef-Friedrich/ansible-module-userdetect
SummaryAnsible module to detect the existence of user(s) on UNIX operation systems.
upload_time2024-04-14 20:07:49
maintainerNone
docs_urlNone
authorJosef Friedrich
requires_python<4.0,>=3.10
licenseGPL-3.0-only
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ansible-module-userdetect
=========================

:: 

    > USERDETECT    (/etc/ansible/library/userdetect.py)

            Detect the existence of user(s) on UNIX operation systems.
            This module only reports about the existence of users. It
            doesn’t change any data. Use the register key to catch the
            returned informatins about the users.

    OPTIONS (= is mandatory):

    - fallback
            User to look for if the main user can’t be detected.
            default: null

    - user
            The name of the user or a list of users. Users can be
            specified as a comma separted list (user1,user2) or as a YAML
            list.
            default: null

    AUTHOR: Josef Friedrich (@Josef-Friedrich)

    METADATA:
      metadata_version: '0.1'
      status:
      - preview
      supported_by: community

    EXAMPLES:

    - name: Detect user “jf”
      userdetect: user=jf
      register: user

    - name: Detect fallback user “root”.
      userdetect: user=lol
                  fallback=root
      register: user

    - name: Detect users as a list
      userdetect:
        user:
          - jf
          - root
      register: user

    - name: Detect users as a comma separated list
      userdetect: user=jf,root
      register: user

    RETURN VALUES:
    - all
            A list of all users containing a dictionary with the keys
            “username”, “exists”, “uid”, “gid”, “home”, “shell”.
            returned: In multi mode
            type: list

    - existent
            A list of all existing users containing a dictionary with the
            keys “username”, “exists”, “uid”, “gid”, “home”, “shell”.
            returned: In multi mode
            type: list

    - exists
            Indicates if the user exists
            returned: always
            sample: true
            type: boolean

    - fallback
            Indicates if the user is a the fallback user or not.
            returned: If the user exists
            sample: true
            type: boolean

    - gid
            The group ID
            returned: If the user exists
            sample: 1000
            type: integer

    - home
            The path of the home folder
            returned: If the user exists
            sample: /home/jf
            type: string

    - non_existent
            A list of all non existing users containing a dictionary with
            the keys “username”, “exists”, “uid”, “gid”, “home”, “shell”.
            returned: In multi mode
            type: list

    - shell
            The absoltue path of the shell the user uses.
            returned: If the user exists
            sample: /bin/bash
            type: string

    - uid
            The user ID
            returned: If the user exists
            sample: 1000
            type: integer

    - username
            The name of the user
            returned: always
            sample: root
            type: string

Development
===========

Test functionality
------------------

::

   /usr/local/src/ansible/hacking/test-module -m userdetect.py -a

Test documentation
------------------

::

   source /usr/local/src/ansible/hacking/env-setup
   /usr/local/src/ansible/test/sanity/validate-modules/validate-modules --arg-spec --warnings userdetect.py

Generate documentation
----------------------

::

   ansible-doc -M . userdetect

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Josef-Friedrich/ansible-module-userdetect",
    "name": "userdetect",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Josef Friedrich",
    "author_email": "josef@friedrich.rocks",
    "download_url": "https://files.pythonhosted.org/packages/e3/b7/56ddb82717cbdc36437892f6e996edd6cb5a16ee28a751b10cad13623d82/userdetect-0.1.0.tar.gz",
    "platform": null,
    "description": "ansible-module-userdetect\n=========================\n\n:: \n\n    > USERDETECT    (/etc/ansible/library/userdetect.py)\n\n            Detect the existence of user(s) on UNIX operation systems.\n            This module only reports about the existence of users. It\n            doesn\u2019t change any data. Use the register key to catch the\n            returned informatins about the users.\n\n    OPTIONS (= is mandatory):\n\n    - fallback\n            User to look for if the main user can\u2019t be detected.\n            default: null\n\n    - user\n            The name of the user or a list of users. Users can be\n            specified as a comma separted list (user1,user2) or as a YAML\n            list.\n            default: null\n\n    AUTHOR: Josef Friedrich (@Josef-Friedrich)\n\n    METADATA:\n      metadata_version: '0.1'\n      status:\n      - preview\n      supported_by: community\n\n    EXAMPLES:\n\n    - name: Detect user \u201cjf\u201d\n      userdetect: user=jf\n      register: user\n\n    - name: Detect fallback user \u201croot\u201d.\n      userdetect: user=lol\n                  fallback=root\n      register: user\n\n    - name: Detect users as a list\n      userdetect:\n        user:\n          - jf\n          - root\n      register: user\n\n    - name: Detect users as a comma separated list\n      userdetect: user=jf,root\n      register: user\n\n    RETURN VALUES:\n    - all\n            A list of all users containing a dictionary with the keys\n            \u201cusername\u201d, \u201cexists\u201d, \u201cuid\u201d, \u201cgid\u201d, \u201chome\u201d, \u201cshell\u201d.\n            returned: In multi mode\n            type: list\n\n    - existent\n            A list of all existing users containing a dictionary with the\n            keys \u201cusername\u201d, \u201cexists\u201d, \u201cuid\u201d, \u201cgid\u201d, \u201chome\u201d, \u201cshell\u201d.\n            returned: In multi mode\n            type: list\n\n    - exists\n            Indicates if the user exists\n            returned: always\n            sample: true\n            type: boolean\n\n    - fallback\n            Indicates if the user is a the fallback user or not.\n            returned: If the user exists\n            sample: true\n            type: boolean\n\n    - gid\n            The group ID\n            returned: If the user exists\n            sample: 1000\n            type: integer\n\n    - home\n            The path of the home folder\n            returned: If the user exists\n            sample: /home/jf\n            type: string\n\n    - non_existent\n            A list of all non existing users containing a dictionary with\n            the keys \u201cusername\u201d, \u201cexists\u201d, \u201cuid\u201d, \u201cgid\u201d, \u201chome\u201d, \u201cshell\u201d.\n            returned: In multi mode\n            type: list\n\n    - shell\n            The absoltue path of the shell the user uses.\n            returned: If the user exists\n            sample: /bin/bash\n            type: string\n\n    - uid\n            The user ID\n            returned: If the user exists\n            sample: 1000\n            type: integer\n\n    - username\n            The name of the user\n            returned: always\n            sample: root\n            type: string\n\nDevelopment\n===========\n\nTest functionality\n------------------\n\n::\n\n   /usr/local/src/ansible/hacking/test-module -m userdetect.py -a\n\nTest documentation\n------------------\n\n::\n\n   source /usr/local/src/ansible/hacking/env-setup\n   /usr/local/src/ansible/test/sanity/validate-modules/validate-modules --arg-spec --warnings userdetect.py\n\nGenerate documentation\n----------------------\n\n::\n\n   ansible-doc -M . userdetect\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-only",
    "summary": "Ansible module to detect the existence of user(s) on UNIX operation systems. ",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/Josef-Friedrich/ansible-module-userdetect",
        "Repository": "https://github.com/Josef-Friedrich/ansible-module-userdetect"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "09de3067d4015a79e932de2a57e2cee800d12500e485ef72cf06dc367859ab5e",
                "md5": "3cd2e82e252a4fdb4f349f6ee8ebd57f",
                "sha256": "a08a8a70b76bc50d93984d267fa08e2ed60ad52eb98a91a2ac772ea9ca25a6b5"
            },
            "downloads": -1,
            "filename": "userdetect-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3cd2e82e252a4fdb4f349f6ee8ebd57f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 16512,
            "upload_time": "2024-04-14T20:07:47",
            "upload_time_iso_8601": "2024-04-14T20:07:47.809828Z",
            "url": "https://files.pythonhosted.org/packages/09/de/3067d4015a79e932de2a57e2cee800d12500e485ef72cf06dc367859ab5e/userdetect-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e3b756ddb82717cbdc36437892f6e996edd6cb5a16ee28a751b10cad13623d82",
                "md5": "a561aa34414cd91d2b9b9a839479b27f",
                "sha256": "fac5e3b58100030c47a6c6febcfdcd4d0141b71ad52bbfbcdef5bd9a416cb1ee"
            },
            "downloads": -1,
            "filename": "userdetect-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a561aa34414cd91d2b9b9a839479b27f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 15440,
            "upload_time": "2024-04-14T20:07:49",
            "upload_time_iso_8601": "2024-04-14T20:07:49.925252Z",
            "url": "https://files.pythonhosted.org/packages/e3/b7/56ddb82717cbdc36437892f6e996edd6cb5a16ee28a751b10cad13623d82/userdetect-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-14 20:07:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Josef-Friedrich",
    "github_project": "ansible-module-userdetect",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "userdetect"
}
        
Elapsed time: 0.26301s