Skip to content

proact-de/ansible-role-admins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

proactcloud.admins

This role will configure users on a Linux system and will manage SSH Key deployment and the appropriate user accounts. Specifically this role will create all users from the pacadmins_admin_users dictionary with the appropriate settings and SSH Keys (exclusively!). Root will only have a singular SSH key (this is enforced!), which is taken from pacadmins_root_ssh_key.

UIDs are expected to be in the 10000 - 20000 range (inclusive). In the future this script may also allow normal users to be created (no admins, no sudo etc.), which will then be in the 1000-9999 UID range.

UIDs above 20000 will then be considered "rogue" (except for nobody etc.) and will be purged.

Requirements

None.

Role Variables

  • pacadmins_admin_users: dictionary for each user to be created and enabled:
 pacadmins_admin_users:
   username1:
     fullname: Hans W. User
     uid: 10000
     sshkey: "ssh-ed25519 AAAAC3NzaC1lDHZ%NTE5AAAAIIPc1iBgkjhf/KJNWD726KGAOnZtJbvFL35l3ZByz Hans W. User, <hansw@example.com>, 2017-02-05"
     additional_groups:
       - sudo

Dependencies

None.

Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

- hosts: servers
  include_vars: my_admins.yml
  roles:
     - { role: proactcloud.admins }

License

Copyright 2019 Proact Deutschland GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Author Information

Patrick Dreker (patrick.dreker@proact.de)

About

Provision and control admin users on Linux systems

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published