Skip to content

This role adds password-less sudo for a list of users and groups.

License

Notifications You must be signed in to change notification settings

dinohead/ar_linux_sudoers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ar_linux_sudoers

This role adds password-less sudo for a list of users and groups.

Requirements

  • This role uses root to manage sudoers. ansible_user must be able to sudo to root without a password.
  • This role uses Ansible magic variables to discover the host distribution type.

Role Variables

All over-writable variables used in this role are defined in defaults/main.yml.

You can override the variables in any standard Ansible-way (e.g. group_vars, host_vars, playbook variables, command-line, etc.).

The variables in this role include:

Name Description Type Default
sudoers List of users or groups to grant password-less sudo list []

Dependencies

N/A

Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

  • Must include list items in single quotes
- name: PLAY | (2) Role with over-rides
  hosts: servers
  roles:
     - role: rolename
       sudoers: ['test_user', '%test_group']

Author Information

Author E-mail
Derek 'dRock' Halsey derek.halsey@dinohead.com

License

MIT License

Copyright (c) 2019 Dinohead LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Role Development Information

Testing

Contributing

Git SCM

Please refer to the .gitignore file and update accordingly depending on your development environment, etc. The particular file was generated at gitignore.io and contains settings for the following:

  • Ansible
  • Python
  • Vim
  • Eclipse
  • IntelliJ IDEA
  • Linux
  • Windows

Versioning

Please update VERSION.md as you release new versions of your role and try to abide by Semantic Versioning.

Self-contained

Please try to keep this role as self-contained as possible such that it may be simply installed (e.g. ansible-galaxy install) and applied as part of a playbook.

About

This role adds password-less sudo for a list of users and groups.

Resources

License

Stars

Watchers

Forks

Packages

No packages published