{"id":21835159,"url":"https://github.com/roles-ansible/ansible_role_auth","last_synced_at":"2026-05-11T02:10:37.590Z","repository":{"id":42383722,"uuid":"145161162","full_name":"roles-ansible/ansible_role_auth","owner":"roles-ansible","description":"Ansible Rolle für die SSH Keys","archived":false,"fork":false,"pushed_at":"2022-04-07T20:36:53.000Z","size":87,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-26T09:44:28.468Z","etag":null,"topics":["ansible","ansible-role","ssh"],"latest_commit_sha":null,"homepage":null,"language":"Jinja","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/roles-ansible.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},"funding":{"github":["do1jlr"],"liberapay":"L3D"}},"created_at":"2018-08-17T19:56:07.000Z","updated_at":"2022-04-07T20:36:56.000Z","dependencies_parsed_at":"2022-09-21T18:13:03.179Z","dependency_job_id":null,"html_url":"https://github.com/roles-ansible/ansible_role_auth","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/roles-ansible%2Fansible_role_auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roles-ansible%2Fansible_role_auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roles-ansible%2Fansible_role_auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roles-ansible%2Fansible_role_auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roles-ansible","download_url":"https://codeload.github.com/roles-ansible/ansible_role_auth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244811380,"owners_count":20514276,"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-role","ssh"],"created_at":"2024-11-27T20:18:03.691Z","updated_at":"2026-05-11T02:10:37.537Z","avatar_url":"https://github.com/roles-ansible.png","language":"Jinja","funding_links":["https://github.com/sponsors/do1jlr","https://liberapay.com/L3D"],"categories":[],"sub_categories":[],"readme":"[![Ansible Galaxy](https://raw.githubusercontent.com/roles-ansible/ansible_role_auth/main/.github/galaxy.svg?sanitize=true)](https://galaxy.ansible.com/do1jlr/auth) [![MIT License](https://raw.githubusercontent.com/roles-ansible/ansible_role_auth/main/.github/license.svg?sanitize=true)](https://github.com/roles-ansible/ansible_role_auth/blob/main/LICENSE)\n\n ansible role auth\n==============================\nAnsible Rolle to manage and deploy ssh keys of admin and non-admin users\n\n intended use\n---------------\nThis role is designed to manage linux hosts with the following roles. This role here basically only focuses on deploying the correct ssh public keys to the correct users depending on the configuration.\nOther roles icreating users and groups, configure sshd, roll out dotfiles or install a number of useful packages.\n\nA list of suggested roles to manage your linux host:\n - [do1jlr.base](https://github.com/roles-ansible/ansible_role_base.git) *install some useful packages*\n - [do1jlr.users](https://github.com/roles-ansible/ansible_role_users.git) *create user and manage sudoers*\n - [do1jlr.auth](https://github.com/roles-ansible/ansible_role_auth.git) *(this one)*\n - [do1jlr.sshd](https://github.com/roles-ansible/ansible_role_sshd.git) *configure sshd*\n - [do1jlr.dotfiles](https://github.com/roles-ansible/ansible_role_dotfiles) *deploy some fancy dotfiles*\n\n Good to know:\n---------------\nThe listed roles use the same variables to create accounts, admins and so on. But the roles have to run in the correct order to work properly.\nFor example you can't deploy a ssh public key for a user that is not created.\n\n Variables\n---------\n\n* ``admins`` (default ``[]``):\u003cbr/\u003e\n  A list of ``ssh`` keys allowed to log in as `root`.\n\n* ``accounts`` (default ``[]``):\u003cbr/\u003e\n  A list of usernames that will be created on this host, if they don't exisit\n\n* `users` (default `{}`):\u003cbr/\u003e\n  A dict of user names mapping to lists of ``ssh`` keys\n  allowed to log in to the given user account.\n\n* ``ssh_public_key_store`` (default ``ssh_public_keys``):\u003cbr/\u003e\n  A directory path where the public key files can be found by ansible.\n\nFor aditional variables please have a look into ``defaults/main.yml``!\n\nTo add extra SSH Keys from github to a user use the ``github_users: {}`` settings\n\n Files\n-----\n\nThis role assumes that the *public* parts of all required ``ssh`` keys\ncan be found within the directory ``ssh_public_key_store``. The file\nnames must follow the convention: ``username_idalg.pub`` are are matched\nby the ``username`` part.\n\n\n Examples\n--------\n\nAlice and Bob may log in and are allowed to become ``root`` with the ``sudo`` command on this host:\n\n```\nadmins:\n  - alice\n  - bob\n```\n\nAlice, Bob and Eve may log in to ther own user accounts via ssh:\n```\nusers:\n  alice:\n    - alice\n  eve:\n    - eve@device1\n    - eve@device2\n```\nEve can do so with two different `ssh` keys. Alice only with his only SSH Key.\n\n\nThe `files/ssh_public_keys/` contains the following files:\n\n```\nalice_ed25519.pub\nbob_ed25519.pub\neve@device1_ed25519.pub\neve@device2_ed25519.pub\n```\n\nAlice, Bob and Eve want to be users on this host:\n```\naccounts:\n  - alice\n  - bob\n  - eve\n```\n\nAdd ssh keys from github user ``DO1JLR`` for local user L3D\n```\ngithub_users:\n  l3d:\n    - do1jlr\n```\n Generate ed25519 SSH Keys\n--------------------------------\n\n```bash\nssh-keygen -t ed25519\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froles-ansible%2Fansible_role_auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froles-ansible%2Fansible_role_auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froles-ansible%2Fansible_role_auth/lists"}