Code Monkey home page Code Monkey logo

ansible-role-users's Introduction

ansible-role-users

Manage OS groups and users (including ssh keys, authorized_keys, ssh known hosts).

Requirements

  • RHEL8+

Role Variables

  • users_groups_present - list of groups to create, example:
users_groups_present:
  - name: testgroup
  • users_groups_absent - list of groups to remove, exmaple:
users_groups_absent:
  - name: testgroup
  • users_present - list of users to create (including ssh keys, authorized_keys, ssh known hosts), example:
users_present:
  - name: myuser
    home: /mnt/myuser # optional
    authorized_keys:
      - "ssh-rsa some-key1"
      - "ssh-rsa some-key2"
    ssh_keys:
      - src: /tmp/id_rsa
        dest_file: id_rsa
      - src: /tmp/id_rsa.pub
        dest_file: id_rsa.pub
    known_hosts:
      - name: github.com
        key: "github.com ssh-rsa some-key"
        path: /mnt/myuser/.ssh/known_hosts

Dependencies

Collections:

  • ansible.builtin
  • ansible.posix

Example Playbook

- hosts: my_servers
  vars:
    users_present:
      - name: root
        home: /root
        authorized_keys:
          - "ssh-rsa my-key"
  roles:
    - ansible-role-users

License

GPLv3

Author Information

Vladimir Vasilev (@vladi-k)

ansible-role-users's People

Contributors

vladi-k avatar

Watchers

James Cloos avatar  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.