Forge Home

ipmi

manages the OpenIPMI package

1,213,634 downloads

826 latest version

5.0 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

  • 6.1.0 (latest)
  • 6.0.0
  • 5.3.1
  • 5.3.0
  • 5.2.0
  • 5.1.0
  • 5.0.0
  • 4.0.0
  • 3.1.0
  • 3.0.1
  • 3.0.0
  • 2.3.0
  • 2.2.0
  • 2.1.0
  • 2.0.0
  • 1.2.0
  • 1.1.1
  • 1.1.0
  • 1.0.1
  • 1.0.0
released Sep 24th 2024
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
  • Puppet >= 7.0.0 < 9.0.0
  • , , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'jhoblitt-ipmi', '6.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add jhoblitt-ipmi
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install jhoblitt-ipmi --version 6.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

jhoblitt/ipmi — version 6.1.0 Sep 24th 2024

Puppet ipmi Module

CI markdownlint shellcheck yamllint

Table of Contents

  1. Overview
  2. Description
  3. Usage
  1. Additional Facts
  2. Limitations
  3. Versioning
  4. Support
  5. Contributing
  6. See Also

Overview

Manages the OpenIPMI package

Description

Installs the OpemIPMI package, provides IPMI facts in a format compatible with The Foreman's BMC features and enables the ipmi service. The latter loads the kernel drivers needed for communicating with the BMC from user space.

Usage

Reference

See REFERENCE

Examples

  include ipmi

Create a user with admin privileges (default):

  ipmi::user { 'newuser1':
    user     => 'newuser1',
    password => 'password1',
    user_id  => 4,
  }

Create a user with operator privileges:

  ipmi::user { 'newuser2':
    user     => 'newuser2',
    password => 'password2',
    priv     => 3,
    user_id  => 5,
  }

Create a user with user privileges on a specific channel:

  ipmi::user { 'newuser3':
    user     => 'newuser3',
    password => 'password3',
    priv     => 2,
    user_id  => 6,
    channel  => 3,
  }

Configure a static ip on IPMI lan channel 1:

  ipmi::network { 'lan1':
    type        => 'static',
    ip          => '192.168.1.10',
    netmask     => '255.255.255.0',
    gateway     => '192.168.1.1',
  }

Configure IPMI lan channel 1 to DHCP:

  ipmi::network { 'dhcp': }

Configure IPMI snmp string on lan channel 1:

 ipmi::snmp { 'lan1':
   snmp        => 'secret',
   lan_channel => 1,
 }

Classes

ipmi

  # defaults
  class { 'ipmi':
    service_ensure         => 'running', # default is 'running'
    ipmievd_service_ensure => 'running', # default is 'stopped'
    watchdog               => true,      # default is false
  }

Defined Resources

ipmi::user

  # defaults
  ipmi::user { 'newuser':
    user     => 'root',
    priv     => 4,           # Administrator
    user_id  => 3,
  }

ipmi::network

  # defaults
  ipmi::network { 'lan1':
    type        => 'dhcp',
    ip          => '0.0.0.0',
    netmask     => '255.255.255.0',
    gateway     => '0.0.0.0',
    lan_channel => 1,
  }

ipmi::snmp

  # defaults
  ipmi::snmp { 'lan1':
    snmp        => 'public',
    lan_channel => 1,
  }

Additional Facts

This module provides additional facts for Facter with the following formats:

Structured Format

ipmi => {
  default => {
    channel => 1,
    gateway => 192.168.10.1,
    ipaddress => 192.168.10.201,
    ipaddress_source => Static Address,
    macaddress => 00:30:48:c9:64:2a,
    subnet_mask => 255.255.255.0,
    users => {
      1 => {
        id => 1,
        name => '',
        privilege => 'NO ACCESS',
      },
      2 => {
        id => 2,
        name => 'admin',
        privilege => 'ADMINISTRATOR',
      }
    },
  },
  1 => {
    channel => 1,
    gateway => 192.168.10.1,
    ipaddress => 192.168.10.201,
    ipaddress_source => Static Address,
    macaddress => 00:30:48:c9:64:2a,
    subnet_mask => 255.255.255.0,
    users => {
      1 => {
        id => 1,
        name => '',
        privilege => 'NO ACCESS',
      },
      2 => {
        id => 2,
        name => 'admin',
        privilege => 'ADMINISTRATOR',
      }
    },
  },
}

DEPRECATED Flat Format

ipmi1_gateway => 192.168.10.1
ipmi1_ipaddress => 192.168.10.201
ipmi1_ipaddress_source => Static Address
ipmi1_macaddress => 00:30:48:c9:64:2a
ipmi1_subnet_mask => 255.255.255.0

where the 1 in ipmi1 corresponds to the channel according to ipmitool lan print.

Additionally for compatibility with The Foreman, the first IPMI interface (i.e. the one from ipmi lan print 1) gets all facts repeated as just ipmi_foo:

ipmi_gateway => 192.168.10.1
ipmi_ipaddress => 192.168.10.201
ipmi_ipaddress_source => Static Address
ipmi_macaddress => 00:30:48:c9:64:2a
ipmi_subnet_mask => 255.255.255.0

Limitations

At present, only support for RedHat and Debian distributions has been implemented.

Adding other Linux distrubtions should be trivial.

Versioning

This module is versioned according to the Semantic Versioning 2.0.0 specification.

Support

Please log tickets and issues at github

Contributing

  1. Fork it on github
  2. Make a local clone of your fork
  3. Create a topic branch. Eg, feature/mousetrap
  4. Make/commit changes
  • Commit messages should be in imperative tense
  • Check that linter warnings or errors are not introduced - bundle exec rake lint
  • Check that Rspec-puppet unit tests are not broken and coverage is added for new features - bundle exec rake spec
  • Documentation of API/features is updated as appropriate in the README
  • If present, beaker acceptance tests should be run and potentially updated - bundle exec rake beaker
  1. When the feature is complete, rebase / squash the branch history as necessary to remove "fix typo", "oops", "whitespace" and other trivial commits
  2. Push the topic branch to github
  3. Open a Pull Request (PR) from the topic branch onto parent repo's master branch

See Also