clienttags

/etc/clienttags for a puppet managed self-service environment.
Jonathan Senkerik

Jonathan Senkerik

josenk

4,025 downloads

3,579 latest version

4.6 quality score

Version information

  • 1.0.1 (latest)
  • 1.0.0
released Jul 3rd 2019
This version is compatible with:
  • RedHat
    ,
    CentOS
    ,
    OracleLinux
    ,
    Scientific
    ,
    SLES
    ,
    Debian
    ,
    Ubuntu
    ,
    Solaris
    ,
    AIX
    ,
    OSX

Start using this module

Documentation

josenk/clienttags — version 1.0.1 Jul 3rd 2019

josenk-clienttags - /etc/clienttags for a puppet managed "self-service" environment.

Table of Contents

  1. Description
  2. Setup - The basics of getting started with clienttags
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development

Description

This module provides a way to give System Administrators a "self-service" access to puppet modules. In some organizations, not all environments are fully managed by the puppet team. If you have a "self-service" environment, you can write puppet modules that will run based on the tags managed by the system administrators.

Basically, you're giving systems owners the ability to tag their own servers without access to puppet.

This module will install a text file /etc/clienttags on the puppet client. It can then be edited by the system owner. The unremarked lines will be stored in a fact "clienttags". Using this custom fact, you can build modules to provide any type of functionality the remote system administrator is requesting.

$ puppet facts |grep  clienttags
    "clienttags": "'installdevtools'\n'installprinting'\n'set_ssh_noknown_hosts'\n'set_tuned_performance'\n'vmware_guest'",

Setup

What clienttags affects

This module will copy an example /etc/clienttags to your puppet clients. You may want to customize the sample file to set some defaults or to list all available tags you support.

A custom fact will be created "clienttags".

Usage

For example:

The contents of /etc/clienttags contain a line:

installdevtools

You write a puppet module to install some basic development tools.

class { 'do_stuff_by_clienttags':
    include ::clienttags
    if ( $::facts['clienttags'] =~ /installdevtools/ ) {
        include ::stdlib
        ensure_packages('gcc')
        ensure_packages('git')
        ensure_packages('make')
    }
}

Limitations

Currently this is for Linux/Unix type OS's only.

Be careful of your REGEX!

Development

A new version (coming soon). Instead of a hard-coded source, you will be able to specify any source for the default /etc/clienttags.

Release Notes.

v1.0.0 This is the initial release.