Skip to content

Myothas/ansible-user-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

ansible-user-control

Manages users and their ssh keys on linux hosts.

Important Notes:

  • Any users not specified in the user-vars.yml will be deleted (Excluding centos and ubuntu).
  • If you don't want the users to be able to escalate to root without password change escalate_root_no_pass to false.

Usage

user-control/vars/user-vars.yml contains the list of users you want to create.

Example:

- username: username
  fullname: "Full Name"
  email: "[email protected]"
  shell: /bin/bash
  ssh_key: "{{ lookup('file', 'username.pub') }}"
  exclusive_ssh_key: yes
  user_state: present
  groups: admin
  servers:
    - masters
    - bastion

For each new user you create you must:

  • Create a public key file under user-control/files/ which matches the username.
  • Provide a list of groups matching the inventory groups which the user should have access.

About

Manages users and their SSH keys on linux hosts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published