community.general.cobbler – Cobbler inventory source

From Get docs
Ansible/docs/2.10/collections/community/general/cobbler inventory


community.general.cobbler – Cobbler inventory source

Note

This plugin is part of the community.general collection (version 1.3.2).

To install it use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.cobbler.


New in version 1.0.0: of community.general


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 has a plugin: cobbler entry.

Parameters

Parameter Choices/Defaults Configuration Comments

cache

boolean

  • no

  • yes

ini entries: [inventory]cache = no


env:ANSIBLE_INVENTORY_CACHE

Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work.

cache_connection

string

ini entries: [defaults]fact_caching_connection = None

[inventory]cache_connection = None


env:ANSIBLE_CACHE_PLUGIN_CONNECTION

env:ANSIBLE_INVENTORY_CACHE_CONNECTION

Cache connection data or path, read cache plugin documentation for specifics.

cache_fallback

boolean

  • no

  • yes

Fallback to cached results if connection to cobbler fails

cache_plugin

string

Default:

"memory"

ini entries: [defaults]fact_caching = memory

[inventory]cache_plugin = memory


env:ANSIBLE_CACHE_PLUGIN

env:ANSIBLE_INVENTORY_CACHE_PLUGIN

Cache plugin to use for the inventory's source data.

cache_prefix

string

Default:

"ansible_inventory_"

ini entries: [default]fact_caching_prefix = ansible_inventory_

[inventory]cache_prefix = ansible_inventory_


env:ANSIBLE_CACHE_PLUGIN_PREFIX

env:ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX

Prefix to use for cache plugin files/tables

cache_timeout

integer

Default:

3600

ini entries: [defaults]fact_caching_timeout = 3600

[inventory]cache_timeout = 3600


env:ANSIBLE_CACHE_PLUGIN_TIMEOUT

env:ANSIBLE_INVENTORY_CACHE_TIMEOUT

Cache duration in seconds

exclude_profiles

list / elements=string

Default:

[]

Profiles to exclude from inventory

group

string

Default:

"cobbler"

Group to place all hosts into

group_by

list / elements=string

Default:

["mgmt_classes", "owners", "status"]

Keys to group hosts by

group_prefix

string

Default:

"cobbler_"

Prefix to apply to cobbler groups

password

string

env:COBBLER_PASSWORD

Cobbler authentication password

plugin

string / required

  • cobbler
  • community.general.cobbler

The name of this plugin, it should always be set to community.general.cobbler for this plugin to recognize it as it's own.

url

string

Default:

env:COBBLER_SERVER

URL to cobbler.

user

string

env:COBBLER_USER

Cobbler authentication user.

want_facts

boolean

  • no
  • yes

Toggle, if true the plugin will retrieve host facts from the server



Examples

# my.cobbler.yml
plugin: community.general.cobbler
url: http://cobbler/cobbler_api
user: ansible-tester
password: secure

Authors

  • Orion Poplawski (@opoplawski)

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/general/cobbler_inventory.html