community.general.cobbler inventory – Cobbler inventory source
Note
This inventory plugin is part of the community.general collection (version 10.1.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.cobbler
.
New in community.general 1.0.0
Synopsis
Get inventory hosts from the cobbler service.
Uses a configuration file as an inventory source, it must end in
.cobbler.yml
or.cobbler.yaml
and have aplugin: cobbler
entry.Adds the primary IP addresses to
cobbler_ipv4_address
andcobbler_ipv6_address
host variables if defined in Cobbler. The primary IP address is defined as the management interface if defined, or the interface who’s DNS name matches the hostname of the system, or else the first interface found.
Parameters
Parameter |
Comments |
---|---|
Toggle to enable/disable the caching of the inventory’s source data, requires a cache plugin setup to work. Choices:
Configuration:
|
|
Cache connection data or path, read cache plugin documentation for specifics. Configuration:
|
|
Fallback to cached results if connection to cobbler fails. Choices:
|
|
Cache plugin to use for the inventory’s source data. Default: Configuration:
|
|
Prefix to use for cache plugin files/tables. Default: Configuration:
|
|
Cache duration in seconds. Default: Configuration:
|
|
Management classes to exclude from inventory. Default: |
|
Group to place all hosts into. Default: |
|
Keys to group hosts by. Default: |
|
Prefix to apply to cobbler groups. Default: |
|
Management classes to include from inventory. Default: |
|
Profiles to include from inventory. If specified, all other profiles will be excluded.
Default: |
|
What to use for the ansible inventory hostname. By default the networking hostname is used if defined, otherwise the DNS name of the management or first non-static interface. If set to Choices:
|
|
The name of this plugin, it should always be set to Choices:
|
|
URL to cobbler. Default: Configuration:
|
|
Toggle, if Choices:
|
|
Toggle, if Choices:
|
Examples
# my.cobbler.yml
plugin: community.general.cobbler
url: http://cobbler/cobbler_api
user: ansible-tester
password: secure