{"id":16779642,"url":"https://github.com/ahuffman/ansible-role-scan-sudoers","last_synced_at":"2026-05-04T16:37:14.558Z","repository":{"id":69819572,"uuid":"174029674","full_name":"ahuffman/ansible-role-scan-sudoers","owner":"ahuffman","description":"An Ansible role to collect Ansible Facts on sudoers files","archived":false,"fork":false,"pushed_at":"2021-07-19T21:51:40.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T06:28:14.839Z","etag":null,"topics":["ansible","ansible-facts","ansible-role","sudo","sudoers"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahuffman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-05T22:23:18.000Z","updated_at":"2021-07-19T21:51:42.000Z","dependencies_parsed_at":"2023-02-24T14:00:38.737Z","dependency_job_id":null,"html_url":"https://github.com/ahuffman/ansible-role-scan-sudoers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahuffman%2Fansible-role-scan-sudoers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahuffman%2Fansible-role-scan-sudoers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahuffman%2Fansible-role-scan-sudoers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahuffman%2Fansible-role-scan-sudoers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahuffman","download_url":"https://codeload.github.com/ahuffman/ansible-role-scan-sudoers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243923819,"owners_count":20369609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-facts","ansible-role","sudo","sudoers"],"created_at":"2024-10-13T07:31:15.734Z","updated_at":"2026-05-04T16:37:09.468Z","avatar_url":"https://github.com/ahuffman.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Ansible Role](https://img.shields.io/ansible/role/d/41537)\n\n# ahuffman.scan_sudoers\n\nAn Ansible Role to parse /etc/sudoers and included files on a Linux/Unix system.  This Role contains a custom Ansible module which returns the parsed sudoers data.\n\n## scan_sudoers Ansible Module\nThe module can be called with its defaults by invoking a task in the following way:\n```yaml\n- name: \"Scan Sudoers configuration\"\n  scan_sudoers:\n```\n\n### Module Parameters\n| Parameter Name | Description | Required | Default Value | Type |\n| --- | --- | --- | :---: | :---: |\n| output_raw_configs | Whether or not to output the raw (non-comment) configuration lines | no | True | boolean |\n| output_parsed_configs | Whether or not to parse the configuration into fact data | no | True | boolean |\n\n### Returned Data Sample\n```yaml\nansible_facts:\n  sudoers:\n    all_scanned_files:\n    - /etc/sudoers.d/XPERM_AIX\n    - /etc/sudoers.d/TEST_2\n    - /etc/sudoers\n    sudoers_files:\n    - aliases:\n        cmnd_alias:\n        - commands:\n          - /bin/ping\n          name: PING\n        - commands:\n          - /bin/ping\n          - /sbin/ifconfig\n          name: TEST\n        - commands:\n          - /usr/sbin/mkfs\n          name: BEST\n        host_alias:\n        - hosts:\n          - huff-satellite\n          - huff-rhel7\n          name: SOMEHOSTS\n        - hosts:\n          - test1\n          - test2\n          - test3\n          name: SOMEGHOSTS\n        - hosts:\n          - thathost1\n          name: ANOTHER\n        runas_alias:\n        - name: HUFF\n          users:\n          - ahuffman\n          - root\n        - name: TEST\n          users:\n          - root\n        user_alias:\n        - name: HUFF\n          users:\n          - ahuffman\n          - root\n        - name: TEST\n          users:\n          - root\n      defaults:\n      - '!visiblepw'\n      - env_reset\n      - secure_path:\n        - /usr/local/sbin\n        - /usr/local/bin\n        - /usr/sbin\n        - /usr/bin\n        - /sbin\n        - /bin\n      - env_keep:\n        - COLORS\n        - DISPLAY\n        - HOSTNAME\n        - HISTSIZE\n        - KDEDIR\n        - LS_COLORS\n        - MAIL\n        - PS1\n        - PS2\n        - QTDIR\n        - USERNAME\n        - LANG\n        - LC_ADDRESS\n        - LC_CTYPE\n        - LC_COLLATE\n        - LC_IDENTIFICATION\n        - LC_MEASUREMENT\n        - LC_MESSAGES\n        - LC_MONETARY\n        - LC_NAME\n        - LC_NUMERIC\n        - LC_PAPER\n        - LC_TELEPHONE\n        - LC_TIME\n        - LC_ALL\n        - LANGUAGE\n        - LINGUAS\n        - _XKB_CHARSET\n        - XAUTHORITY\n      include_directories:\n      - /etc/sudoers.d\n      include_files:\n      - /etc/sudoers.d/XPERM_AIX\n      - /etc/sudoers.d/TEST_2\n      path: /etc/sudoers\n      user_specifications:\n      - commands:\n        - ALL\n        hosts:\n        - ALL\n        operators:\n        - ALL\n        users:\n        - root\n      - commands:\n        - ALL\n        hosts:\n        - ALL\n        operators:\n        - ALL\n        tags:\n        - NOPASSWD\n        users:\n        - '%wheel'\n      - commands:\n        - /sbin/mount /mnt/cdrom\n        - /sbin/umount /mnt/cdrom\n        hosts:\n        - ALL\n        users:\n        - ahuffman\n...\n```\n\n## License\n[MIT](LICENSE)\n\n## Author Information\n[Andrew J. Huffman](mailto:ahuffman@redhat.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahuffman%2Fansible-role-scan-sudoers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahuffman%2Fansible-role-scan-sudoers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahuffman%2Fansible-role-scan-sudoers/lists"}