Git Product home page Git Product logo

puppet-system_role's Introduction

puppet-system_role

Build Status

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.

Overview

Facts (and a module) for identifying information about a system.

Module Description

This module provides information about a node by breaking apart a structured hostname into usable facts. If the hostname is, or could not be structured, the module provides a mechanism for writing an informational file that will be read by facter on the next run.

For the facts to run on the agents, pluginsync must be enabled.

Usage

The module will provide 2 facts (cluster_name and node_number) from a structured hostname that help identify the system (we had hiera in mind when writing this).

The general hostname structure we use is [application name]-[tier]-[node number]. The cluster_name fact is based on application-name-tier, and the node_number fact is simply the node_number.

If the hostname isn't structured, the module can write out a file, the contents of which will be read in lieu of the hostname to generate the 2 facts.

To manage the file, the class can be declared as

class { 'system_role':
  application => 'test-application',
  tier        => 'prod',
  node_number => 0,
}

Limitations

This module was developed and tested on Linux systems.

The concept used here is very simple, and can likely be translated to work on other systems incredibly easily.

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.