Forge Home

freenas_api

Puppet module that interacts with the FreeNAS API

8,042 downloads

8,042 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.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

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