Giter Site home page Giter Site logo

aisbergg / ansible-role-linux-users Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 27 KB

:wrench: An Ansible role to manage users, groups and authorized keys in Linux systems.

License: MIT License

Python 100.00%
ansible-role user group authorized-keys

ansible-role-linux-users's Introduction

Ansible Role: aisbergg.linux_users

This Ansible role manages Linux users and groups. The role supports all relevant options of the Ansible user and group module. In addition it allows to manage the users SSH authorized keys and also allows to pass in passwords as plain text.

Requirements

If you want to pass plaintext passwords to the user module, you need to have the Python package passlib installed.

Role Variables

Variable Default Comments
linux_users [] List of users to be present or absent on the system. The options are the same as the options of the user module. The role provides also the options plain_password and authorized_key. The latter one can either be a string or a mapping as used by the authorized_key module.
linux_groups [] List of groups to be present or absent on the system. The options are the same as the options of the group module.
linux_users_hash_scheme sha512 The scheme used for hashing passwords, if passwords are passed in plain-text using the plain_password option.
linux_users_hash_rounds 29000 Rounds of hashing to be applied to plain-text passwords.

Example Playbook

- hosts: all
  vars:
    linux_users:
      - name: foo
        plain_password: "foobar"
        groups: sudo
        authorized_key: ssh-ed25519 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        shell: /bin/zsh
        state: present

      - name: bar
        state: absent
        remove: true

      - name: yay
        uid: 991
        comment: "User for building and installing packages with YAY"
        shell: "/bin/bash"
        system: yes
        state: present

    linux_groups:
      - name: webteam
        state: present
        gid: 10000

      - name: nginx
        state: absent

  roles:
    - aisbergg.linux_users

License

MIT

Author Information

Andre Lehmann ([email protected])

ansible-role-linux-users's People

Contributors

aisbergg 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.