GithubHelp home page GithubHelp logo

ansible-role-usermanagement's Introduction

Ansible Role: User Management

This role provides user management on a Linux system, including creating users, assigning them to groups, and setting up their SSH keys for authentication.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

group_name: mygroup
users: []
public_key_path: "/path/to/public/key"
  • group_name is the name of the group that the users will be added to.
  • users is a list of users to be created on the system. Each user is defined as a dictionary with the keys name and password_hash. For example:
users:
  - name: user1
    password_hash: hash1
  - name: user2
    password_hash: hash2
  • public_key_path is the path to the public key file that will be added to the authorized_keys file of each user.

Example Playbook

Here's an example playbook using this role:

- hosts: servers
  roles:
    - ansible-role-usermanagement

To use this role with custom variables, include them either in your playbook, command line or in a separate file like so:

- hosts: servers
  roles:
    - ansible-role-usermanagement
  vars:
    group_name: developers
    users:
      - name: dev1
        password_hash: passwordhash1
      - name: dev2
        password_hash: passwordhash2
    public_key_path: "/path/to/your/public/key"

Notes

To get the password hash you could use the following:

ansible-role-usermanagement's People

Contributors

cristisulighetean avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.