GithubHelp home page GithubHelp logo

zyun53 / ansible-role-management-user Goto Github PK

View Code? Open in Web Editor NEW

This project forked from grog/ansible-role-management-user

0.0 1.0 0.0 15 KB

Ansible role for managing a management user.

Home Page: https://galaxy.ansible.com/GROG/management-user

License: MIT License

ansible-role-management-user's Introduction

Management user

Ansible Galaxy Build Status Latest tag Gitter chat

A role for managing a management user.

Requirements

  • Hosts should be bootstrapped for ansible usage (have python,...)
  • Root privileges, eg become: yes
  • useradd, userdel and usermod should be available on the host
  • sudo should be available (attention: this role will enable sudoers.d if not enabled)

Role Variables

Variable Description Default value
management_user_list List of management users [ management_user_settings ]
management_user_list_host List of management users []
management_user_list_group List of management users []
management_user_settings Default Settings for the management user (see details!) see details
management_user_key SSH key for the default user settings ~/.ssh/id_rsa.pub

management_user_list, _list_host and _list_group are merged when managing the users. You can use the host and group lists to specify users per host or group off hosts.

management_user_settings details

By default a user with following data will be created;

management_user_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"

management_user_settings:
  name: management
  comment: Ansible
  shell: '/bin/bash'
  authorized_keys:
    - key: "{{ management_user_key }}"
      exclusive: yes
  sudo:
    hosts: ALL
    as: ALL
    commands: ALL
    nopasswd: yes

When using the default settings, the ssh key can be overridden using the management_user_key variable.

It is however recomended to use your own custom user settings. More information about the available attributes can be found in the documentation of the GROG user, authorized-key and sudo roles.

Dependencies

Example Playbook

---
- hosts: all
  roles:
  - { role: GROG.management-user, become: yes }

Contributing

All assistance, changes or ideas welcome!

Author

By G. Roggemans

License

MIT

ansible-role-management-user's People

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.