Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

⚠️ PLEASE NOTE: This role has been migrated to our hifis.toolkit collection. ⚠️ Ansible role to distribute authorized SSH public keys to users.

Notifications You must be signed in to change notification settings

hifis-net/ansible-role-ssh-keys

Repository files navigation

SSH Keys Role

⚠️ This project is archived! ⚠️

This role has been migrated to our hifis.toolkit collection:

CI Status Ansible Galaxy Role Ansible Galaxy Role downloads Ansible Galaxy quality score Apache-2.0 Licensed Latest release DOI

This Ansible role distributes authorized SSH public keys to users.

Currently supported platforms are:

  • CentOS 7
  • AlmaLinux 8
  • AlmaLinux 9
  • Ubuntu 18.04 LTS
  • Ubuntu 20.04 LTS
  • Ubuntu 22.04 LTS
  • Debian Buster
  • Debian Bullseye

Requirements

None.

Role Variables

ssh_user_list:
  - name: jane
    create_user_account: true
    authorized_keys:
      - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJi3wBlOT+oR8Rd+YQsV8tUoQOd3NSUuyzJYQp8finD6 john@example.com
      - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDXkvy8jMmw45grnmYK+Ylk/mcc7IyG9taNseNiVrGjR8KRHVJpzEntW1g6SAomIGIpBLvviiyhal4E1v1bhpv2JopbiM3JDOck6gwc4AfpanjuZFPuq6stq5pF7bb2C+zliw16zTFL7bp09tD7nNs30GlchB5DU2sSn1zq4iC+eQ== john@example.com

In order to authorize SSH public keys you need to edit the variable ssh_user_list and add a list entry containing the name of the user, a list of authorized_keys and optionally the create_user_account flag if you want the role to take care of creating the account. Each list entry corresponds to one user account.

ssh_authorized_keys_exclusive: true

Whether to remove all other non-specified keys from the authorized_keys file.

Dependencies

None.

License

Apache-2.0

Author Information

This role was created by HIFIS Software Services.

Contributors

We would like to thank and give credits to the following contributors of this project:

  • Be the first to be named here!

About

⚠️ PLEASE NOTE: This role has been migrated to our hifis.toolkit collection. ⚠️ Ansible role to distribute authorized SSH public keys to users.

Topics

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •