Forge Home

sudo

Puppet module for SUDO access

8,478 downloads

8,478 latest version

4.1 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.0 (latest)
released Sep 6th 2013

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'Vglen-sudo', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add Vglen-sudo
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install Vglen-sudo --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: sudo

Documentation

Vglen/sudo — version 0.1.0 Sep 6th 2013

sudo

A puppet module for granting sudo access to a user or to a set of commands.

##Notes This is the inital relase. It's built using paramterized classes, but can be altered for use with hiera.

##Requiremnets The base module installs or verifies that SUDO is installed.

##Usage

User Example:

class sudo::puppet (

$touser = 'puppet', $sudo_users = 'vglen', ){

$capuser = inline_template('<%= touser.upcase %>') notify { "type is set to ${touser}":; }

file {"/etc/sudoers.d/sudo_${touser}": ensure => file, content => template("${module_name}/base_user.erb"), } }

Command Example:

class sudo::puppet (

$touser = 'puppet', $sudocmd = '/usr/bin/puppet agent -t', $sudo_users = 'vglen', $cmd_title = 'puppet_run', ){

$capuser = inline_template('<%= touser.upcase %>') notify { "type is set to ${touser}":; }

file {"/etc/sudoers.d/sudo_${cmd_title}": ensure => file, content => template("${module_name}/base_cmd.erb"), } }