Forge Home

freenas_api

Puppet module that interacts with the FreeNAS API

7,952 downloads

7,952 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 Oct 17th 2015

Start using this module

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

Add this module to your Puppetfile:

mod 'jpl-freenas_api', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add jpl-freenas_api
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install jpl-freenas_api --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

Documentation

jpl/freenas_api — version 0.1.0 Oct 17th 2015

freenas_api

Build Status

Overview

This module interacts with the FreeNAS API. It is currently very limited in functionality so contributions are appreciated.

Module Description

The module only exposes a function, get_jails() that returns a list of jails from the FreeNAS API. The main class also manages the configuration file required by the function.

Installation

puppet module install jpl-freenas_api

Usage

Creating the configuration file:

class { '::freenas_api':
  base_url => 'http://myfreenas',
  username => 'root',
  password => 'rootpw'
}

Functions:

  $jails = get_jails()

Using the future parser language features you could create rudimentary 'service discovery' such as:

  $jails = get_jails()
  $jails.each |$jail| {
    host { $jail['jail_host']:
      ip           => $jail['jail_ipv4'],
      host_aliases => "${jail['jail_host']}.${::domain}"
    }
  }

Building

To test and build this module

bundle install
bundle exec rake spec
bundle exec rake build