Coder Social home page Coder Social logo

ansible-role-site_root's Introduction

barkingiguana.site_root

Manage site root users.

When you get a new EC2 box (for example), you'll have access to the ec2-user or ubuntu or something like that. Rather than having my playbooks remember which machines need which user to log in as, in order to run Ansible and perform administrative actions, I prefer to have a consistent "site root" user which has sudo access.

I've noticed this same pattern over several of my clients, so I've written this role to make sure I don't have to write it again!

Requirements

None

Role Variables

  • site_root_users. An array of users to create as site_root users. See the example playbook below for the structure of this variable. Default: [].

  • site_root_wheel_group_name. The name of the group to use as the wheel group. This group is granted access to sudo. Default: siteroot.

  • site_root_wheel_group_id. The id of the site_root_wheel_group_name. Default: 50000.

Dependencies

None

Example Playbook

- hosts: servers
  vars:
    site_root_wheel_group_name: admingrp
    site_root_users:
      - user:
        username: admin019
        uid: 50500
        shell: /bin/csh
        authorized_keys:
          - "ssh-rsa AAAA...Q== [email protected]"
          - "ssh-rsa AAAA...Q== [email protected]"
  roles:
    - barkingiguana.site_root

License

MIT. See the LICENCE file.

ansible-role-site_root's People

Contributors

craigw avatar

Stargazers

Rafal W. avatar

Watchers

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