Version information
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
Add this module to your Puppetfile:
mod 'jhoblitt-ipmi', '6.1.0'
Learn more about managing modules with a PuppetfileDocumentation
Puppet ipmi Module
Table of Contents
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
- Fork it on github
- Make a local clone of your fork
- Create a topic branch. Eg,
feature/mousetrap
- 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
- When the feature is complete, rebase / squash the branch history as necessary to remove "fix typo", "oops", "whitespace" and other trivial commits
- Push the topic branch to github
- Open a Pull Request (PR) from the topic branch onto parent repo's
master
branch
See Also
Reference
Table of Contents
Classes
Public Classes
ipmi
: Manages OpenIPMI
Private Classes
ipmi::config
ipmi::install
ipmi::service::ipmi
ipmi::service::ipmievd
Defined types
ipmi::network
: Manage BMC network configurationipmi::snmp
: Manage SNMP community stringsipmi::user
: Manage BMC users
Classes
ipmi
Manages OpenIPMI
Parameters
The following parameters are available in the ipmi
class:
packages
config_file
service_name
service_ensure
ipmievd_service_name
ipmievd_service_ensure
watchdog
snmps
users
networks
default_channel
packages
Data type: Array[String]
List of packages to install.
config_file
Data type: Stdlib::Absolutepath
Absolute path to the ipmi service config file.
service_name
Data type: String
Name of IPMI service.
service_ensure
Data type: Stdlib::Ensure::Service
Controls the state of the ipmi
service. Possible values: running
, stopped
ipmievd_service_name
Data type: String
Name of ipmievd service.
ipmievd_service_ensure
Data type: Stdlib::Ensure::Service
Controls the state of the ipmievd
service. Possible values: running
, stopped
watchdog
Data type: Boolean
Controls whether the IPMI watchdog is enabled.
snmps
Data type: Optional[Hash]
ipmi::snmp
resources to create.
users
Data type: Optional[Hash]
ipmi::user
resources to create.
networks
Data type: Optional[Hash]
ipmi::network
resources to create.
default_channel
Data type: Integer[0]
Default channel to use for IPMI commands.
Default value: Integer(fact('ipmi.default.channel') or 1)
Defined types
ipmi::network
Manage BMC network configuration
Parameters
The following parameters are available in the ipmi::network
defined type:
ip
Data type: Stdlib::IP::Address
Controls the IP of the IPMI network.
Default value: '0.0.0.0'
netmask
Data type: Stdlib::IP::Address
Controls the subnet mask of the IPMI network.
Default value: '255.255.255.0'
gateway
Data type: Stdlib::IP::Address
Controls the gateway of the IPMI network.
Default value: '0.0.0.0'
type
Data type: Enum['dhcp', 'static']
Controls the if IP will be from DHCP or Static.
Default value: 'dhcp'
lan_channel
Data type: Optional[Integer]
Controls the lan channel of the IPMI network to be configured. Defaults to the first detected lan channel, starting at 1 ending at 11
Default value: undef
ipmi::snmp
Manage SNMP community strings
Parameters
The following parameters are available in the ipmi::snmp
defined type:
snmp
Data type: String
Controls the snmp string of the IPMI network interface.
Default value: 'public'
lan_channel
Data type: Optional[Integer]
Controls the lan channel of the IPMI network on which snmp is to be configured. Defaults to the first detected lan channel, starting at 1 ending at 11
Default value: undef
ipmi::user
Manage BMC users
Parameters
The following parameters are available in the ipmi::user
defined type:
user
Data type: String
Controls the username of the user to be created.
Default value: 'root'
priv
Data type: Integer
Possible values:
4
- ADMINISTRATOR,
3
- OPERATOR,
2
- USER,
1
- CALLBACK
Controls the rights of the user to be created.
Default value: 4
enable
Data type: Boolean
Should this user be enabled?
Default value: true
user_id
Data type: Integer
The user id of the user to be created. Should be unique from existing users. On SuperMicro IPMI, user id 2 is reserved for the 'ADMIN' username. On ASUS IPMI, user id 2 is reserved for the 'admin' username.
Default value: 3
password
Data type: Optional[Variant[Sensitive[String[1]], String[1]]]
Controls the password of the user to be created.
Default value: undef
channel
Data type: Optional[Integer]
Controls the channel of the IPMI user to be configured. Defaults to the first detected lan channel, starting at 1 ending at 11
Default value: undef
Changelog
All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module.
v6.1.0 (2024-09-24)
Implemented enhancements:
- Addition of 'users' facts #86 (nathanlcarlson)
- More reliably test for current user state #85 (nathanlcarlson)
Fixed bugs:
ipmi::network
is broken whenipmitool
is not installed and thelan_channel
param is unset #88- add ipmi::default_channel param to fix chicken and egg failure #89 (jhoblitt)
- Provide password capacity parameter to set password command #87 (nathanlcarlson)
v6.0.0 (2024-09-12)
Breaking changes:
- drop support for Debian 10 -- EOL #81 (jhoblitt)
- drop support for ubuntu 18.04 -- EOL #80 (jhoblitt)
- drop support for EL7 -- EOL #79 (jhoblitt)
Implemented enhancements:
- Add lan channel fact and user channel support #78 (nathanlcarlson)
- Test password #76 (b4ldr)
Fixed bugs:
v5.3.1 (2024-01-25)
Fixed bugs:
v5.3.0 (2024-01-16)
Implemented enhancements:
v5.2.0 (2023-10-19)
Implemented enhancements:
Closed issues:
- stdlib 9.x.x compat #63
v5.1.0 (2023-06-23)
Implemented enhancements:
v5.0.0 (2023-03-06)
Breaking changes:
- drop puppet6 support (EOL) #60 (jhoblitt)
- drop debian 8 & 9, ubuntu 14.04 & 16.04 support #58 (jhoblitt)
Implemented enhancements:
- Add option to disable users #59 (jcpunk)
- add EL9 support #57 (jhoblitt)
- add AlmaLinux and Rocky support #56 (jhoblitt)
v4.0.0 (2022-09-12)
Breaking changes:
Closed issues:
- Missing "openipmi" service on Debian 6, 7, 8 #29
Merged pull requests:
- Modulesync 5.3.0 #52 (jhoblitt)
- Permit password as Sensitive string #51 (jcpunk)
- run all github actions on PRs #49 (jhoblitt)
v3.1.0 (2022-04-11)
Implemented enhancements:
v3.0.1 (2022-04-08)
Closed issues:
- Dependency cycle #34
Merged pull requests:
v3.0.0 (2022-04-07)
Closed issues:
Merged pull requests:
- 3.0.0 release #45 (jhoblitt)
- modernize code + plumbing #44 (jhoblitt)
- Add support for EL8 #43 (neufeind)
- update module plumbing #40 (jhoblitt)
- Bumps stdlib requirements to next major version. #39 (dupgit)
- user: Handle more than 19 users correctly #37 (ananace)
- Update links #26 (petems)
v2.3.0 (2016-06-30)
Closed issues:
- Fact has a few issues #24
Merged pull requests:
- Large refactor for IPMI facts: #25 (petems)
- Add Debian based os support #23 (petems)
- Update Readme.md with details on defined resources #22 (ripclawffb)
v2.2.0 (2016-06-28)
Closed issues:
Merged pull requests:
- plumbing updates #21 (jhoblitt)
- added defined resources for network and user configuration #20 (ripclawffb)
- quote the numbers in the case statement #18 (mmckinst)
- Silence debug output by default #17 (beddari)
v2.1.0 (2015-10-14)
Merged pull requests:
v2.0.0 (2015-06-06)
Merged pull requests:
- Feature/v2.0.0 #13 (jhoblitt)
- Add support for enabling the IPMI watchdog #11 (bodgit)
- Feature/future parser #10 (jhoblitt)
- consolidate all copyright notices into LICENSE file #9 (jhoblitt)
v1.2.0 (2014-09-02)
Implemented enhancements:
- Request: Ubuntu Support #6
Merged pull requests:
- Feature/v1.2.0 #8 (jhoblitt)
- Added support for EL7. #7 (razorsedge)
v1.1.1 (2013-09-21)
Closed issues:
- Support for ipmievd. #1
v1.1.0 (2013-09-14)
Closed issues:
- LSB facts are a pain. #3
Merged pull requests:
v1.0.1 (2013-09-12)
Merged pull requests:
- remove usage of $::lsbmajdistrelease fact #4 (jhoblitt)
- Support for ipmievd. #2 (razorsedge)
v1.0.0 (2013-08-29)
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/stdlib (>= 4.6.0 < 10.0.0)
- puppetlabs/augeas_core (>= 1.0.4 < 2.0.0)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.