Giter Club home page Giter Club logo

ansible-role-sudoers-manager's Introduction

Build Status Apache License

Ansible Role - Sudoers Manager

Ansible role that manages sudoers.d profiles.

Requirements

None.

Role Variables

The role provides no default variables. It only provides a variable you can set to manage multiple sudoers profiles. Once the sudoers_manager_sudoers_profiles dictionary is properly set, the role will create a file in the sudoers.d folder for each profile it will find defined in it.

In order for the sudoers profiles to be created/managed during provisioning, each sudoers_manager_sudoers_profiles dictionary item must have three keys defined. Those are profile_dir, profile_name and template_path, as you can see below.

Example:

# ./playbook.yml
---
- hosts: localhost
  remote_user: root
  roles:
    - {
      role: walterdolce.sudoers-manager,
      sudoers_manager_sudoers_profiles: {
        profile_1: {
              profile_dir: '/etc/sudoers.d/',
              profile_name: 'john',
              template_path: '/tmp/sudoers-manager/templates/'
           },
        profile_2: {
              profile_dir: '/etc/sudoers.d/',
              profile_name: 'alan',
              template_path: '/tmp/sudoers-manager/templates/'
           }
        }
      }

In the example above, we are going to create two files in the /etc/sudoers.d/ directory: /etc/sudoers.d/john and /etc/sudoers.d/alan. Both will have a corresponding template file in the /tmp/sudoers-manager/templates/ directory, which you will have to provide.

Dependencies

None.

Example Playbook

# ./playbook.yml
---
- hosts: your-hosts-definition
  roles:
    - {
      role: walterdolce.sudoers-manager,
      sudoers_manager_sudoers_profiles: {
        profile_1: {
              profile_dir: '/etc/sudoers.d/',
              profile_name: 'john',
              template_path: '/tmp/sudoers-manager/templates/'
           },
        profile_2: {
              profile_dir: '/etc/sudoers.d/',
              profile_name: 'alan',
              template_path: '/tmp/sudoers-manager/templates/'
           }
        }
      }

Development

Please see the DEVELOPMENT.md file for more information.

License

Apache License 2.0 - Please see the LICENSE file for more information.

Author Information

Developed and maintained by Walter Dolce [email protected]

ansible-role-sudoers-manager's People

Contributors

walterdolce avatar

Watchers

 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.