{"id":21376561,"url":"https://github.com/cchurch/ansible-role-admin-users","last_synced_at":"2025-07-13T10:31:10.209Z","repository":{"id":27050789,"uuid":"30516094","full_name":"cchurch/ansible-role-admin-users","owner":"cchurch","description":"Ansible role to manage admin users, authorized keys and sudo access.","archived":false,"fork":false,"pushed_at":"2022-12-08T03:13:20.000Z","size":81,"stargazers_count":20,"open_issues_count":9,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-07T09:01:36.931Z","etag":null,"topics":["ansible-role","authorized-keys","sudo","wheel"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cchurch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-09T03:06:11.000Z","updated_at":"2024-03-15T12:20:26.000Z","dependencies_parsed_at":"2023-01-14T05:53:34.295Z","dependency_job_id":null,"html_url":"https://github.com/cchurch/ansible-role-admin-users","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/cchurch/ansible-role-admin-users","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cchurch%2Fansible-role-admin-users","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cchurch%2Fansible-role-admin-users/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cchurch%2Fansible-role-admin-users/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cchurch%2Fansible-role-admin-users/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cchurch","download_url":"https://codeload.github.com/cchurch/ansible-role-admin-users/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cchurch%2Fansible-role-admin-users/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265128211,"owners_count":23715621,"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-role","authorized-keys","sudo","wheel"],"created_at":"2024-11-22T09:16:27.149Z","updated_at":"2025-07-13T10:31:09.945Z","avatar_url":"https://github.com/cchurch.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](http://img.shields.io/travis/cchurch/ansible-role-admin-users.svg)](https://travis-ci.org/cchurch/ansible-role-admin-users)\n[![Galaxy](http://img.shields.io/badge/galaxy-cchurch.admin--users-blue.svg)](https://galaxy.ansible.com/cchurch/admin-users/)\n\nAdmin Users\n===========\n\nManage admin users, authorized keys and sudo access.\n\nSupport for Ansible versions \u003c 2.8 was dropped as of version 0.9.0.\n\nRequirements\n------------\n\nThe `sudo` package will be installed if not already installed. Amazon Linux also\nrequires the `shadow-utils` package to be installed prior to running this role.\n\nRole Variables\n--------------\n\nThe following variables may be defined to customize this role:\n\n- `admin_users`: List of admin users to create or update; default is `[]`. Each\n  item in this list should be a hash with the following keys:\n\n   - `username`: Username of the admin user (required).\n   - `fullname`: Full name for the admin user (optional).\n   - `shell`: Default shell for this user; `admin_users_default_shell` will be\n     used if this key is omitted.\n   - `pubkey`: The public key to associate with the given user. This value can\n     be a string containing the content of the user's public key, a string\n     containing a URL to a list of keys (e.g https://github.com/username.keys),\n     or a list of multiple strings containing either public key content or URLs.\n     *Support for lists of keys was added in 0.7.0.*\n   - `pubkey_options`: Additional options to pass to the `authorized_key`\n     module (optional).\n   - `exclusive`: Boolean indicating whether to remove all other public keys\n     (optional).\n\n- `admin_user_groups`: : Boolean indicating whether to create/remove; default is\n  `true`.\n- `admin_users_sudo_nopasswd`: Boolean indicating whether to enable sudo with\n  the `NOPASSWD` option for admin users; default is `true`.\n- `admin_users_default_shell`: Default shell for admin users; default is\n  `\"/bin/bash\"`.\n- `admin_users_to_remove`: List of usernames to remove from the remote system;\n  default is `[]`. If `admin_user_groups` is `true`, groups with these usernames\n  will also be removed.\n\nDependencies\n------------\n\nNone.\n\nExample Playbook\n----------------\n\nThe following playbook updates admin users on dev and prod servers with\ndifferent options:\n\n    - hosts: dev-servers\n      vars:\n        dev_admin_users:\n          - username: joe\n            fullname: \"Joe Dev\"\n            pubkey:\n              - \"ssh-rsa ...\"\n              - \"ssh-dsa ...\"\n          - username: jim\n            fullname: \"Jim Dev\"\n            shell: \"/bin/sh\"\n            pubkey: \"https://github.com/jim.keys\"\n            exclusive: true\n      roles:\n        - role: cchurch.admin-users\n          admin_users: dev_admin_users\n    - hosts: prod-servers\n      vars:\n        prod_admin_users:\n          - username: jon\n            fullname: \"Jon Admin\"\n            pubkey: \"ssh-rsa ...\"\n      roles:\n        - role: cchurch.admin-users\n          admin_users: prod_admin_users\n          admin_users_sudo_nopasswd: false\n\nLicense\n-------\n\nBSD\n\nAuthor Information\n------------------\n\nChris Church ([cchurch](https://github.com/cchurch))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcchurch%2Fansible-role-admin-users","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcchurch%2Fansible-role-admin-users","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcchurch%2Fansible-role-admin-users/lists"}