{"id":14984473,"url":"https://github.com/geerlingguy/ansible-role-github-users","last_synced_at":"2025-08-12T09:07:33.799Z","repository":{"id":41377482,"uuid":"106600940","full_name":"geerlingguy/ansible-role-github-users","owner":"geerlingguy","description":"Ansible Role - GitHub Users","archived":false,"fork":false,"pushed_at":"2025-01-31T03:25:07.000Z","size":33,"stargazers_count":65,"open_issues_count":0,"forks_count":20,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-20T07:02:33.708Z","etag":null,"topics":["account-management","ansible","ansible-role","authorized-keys","github","role","ssh","users"],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/geerlingguy/github-users/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geerlingguy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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,"zenodo":null},"funding":{"github":"geerlingguy","patreon":"geerlingguy"}},"created_at":"2017-10-11T19:39:21.000Z","updated_at":"2025-05-12T10:41:46.000Z","dependencies_parsed_at":"2025-05-20T07:02:35.288Z","dependency_job_id":"44e5956d-ef30-48c5-92e7-4fcee10b94c0","html_url":"https://github.com/geerlingguy/ansible-role-github-users","commit_stats":{"total_commits":36,"total_committers":2,"mean_commits":18.0,"dds":0.02777777777777779,"last_synced_commit":"265a18f3c72b005c9712947a52c74864bd080b28"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/geerlingguy/ansible-role-github-users","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-github-users","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-github-users/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-github-users/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-github-users/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geerlingguy","download_url":"https://codeload.github.com/geerlingguy/ansible-role-github-users/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-github-users/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270032758,"owners_count":24515349,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["account-management","ansible","ansible-role","authorized-keys","github","role","ssh","users"],"created_at":"2024-09-24T14:09:07.622Z","updated_at":"2025-08-12T09:07:33.765Z","avatar_url":"https://github.com/geerlingguy.png","language":null,"readme":"# Ansible Role: GitHub Users\n\n[![CI](https://github.com/geerlingguy/ansible-role-github-users/actions/workflows/ci.yml/badge.svg)](https://github.com/geerlingguy/ansible-role-github-users/actions/workflows/ci.yml)\n\nCreate users based on GitHub accounts.\n\nThis role will take a GitHub username and create a system account with the same username, and will add all the pubkeys associated with the GitHub account to the user's `authorized_keys`.\n\nIt's kind of a cheap way to do public key management for users on your system... but it works!\n\n## Requirements\n\nNone.\n\n## Role Variables\n\nAvailable variables are listed below, along with default values (see `defaults/main.yml`):\n\n    github_users: []\n      # You can specify an object with 'name' (required) and 'groups' (optional):\n      # - name: geerlingguy\n      #   groups: www-data,sudo\n    \n      # Or you can specify a GitHub username directly:\n      # - geerlingguy\n\nA list of users to add to the server; the username will be the `name` (or the bare list item, if it's a string instead of an object). You can add the user to one or more groups (in addition to the `[username]` group) by adding them as a comma-separated list in `groups`.\n\n    github_users_absent: []\n      # You can specify an object with 'name' (required):\n      # - name: geerlingguy\n    \n      # Or you can specify a GitHub username directly:\n      # - geerlingguy\n\nA list of users who should _not_ be present on the server. The role will ensure these user accounts are removed.\n\n    github_users_authorized_keys_exclusive: true\n\nWhether the users' `authorized_keys` files should exclusively contain keys from their GitHub account. This should normally be set to `true` if you are only allowing users to log in using keys available in their GitHub accounts.\n\n    github_url: https://github.com\n\nBy default, use public GitHub (i.e. https://github.com) as the source for users/keys. Override this to use a different GitHub instance/endpoint (e.g. GitHub Enterprise).\n\nIf you need to give the user the ability to self-manage their `authorized_keys` file, then you should set this to `no`, and it will only append new keys, but never remove any additional keys (e.g. old keys removed from their GitHub profile, or keys the end user added manually) from the file.\n\n## Dependencies\n\nNone.\n\n## Example Playbook\n\n    - hosts: servers\n    \n      vars:\n        github_users:\n          # You can specify the `name`:\n          - name: geerlingguy\n            groups: sudo,www-data\n          - name: GrahamCampbell\n          # Or if you don't need to override anything, you can specify the\n          # GitHub username directly:\n          - fabpot\n    \n        github_users_absent:\n          - johndoe\n          - name: josh\n    \n      roles:\n        - geerlingguy.github-users\n\nIf you want to make sure users' public keys are in sync, it is best to run the playbook on a cron, e.g. every 5 min, 10 min, or some other interval. That way you don't have to manually add new keys for users.\n\n## License\n\nMIT / BSD\n\n## Author Information\n\nThis role was created in 2017 by [Jeff Geerling](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/).\n","funding_links":["https://github.com/sponsors/geerlingguy","https://patreon.com/geerlingguy"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeerlingguy%2Fansible-role-github-users","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeerlingguy%2Fansible-role-github-users","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeerlingguy%2Fansible-role-github-users/lists"}