community / community.general / 8.5.0 / inventory / cobbler Cobbler inventory source | "added in version" 1.0.0 of community.general" Authors: Orion Poplawski (@opoplawski)community.general.cobbler (8.5.0) — inventory
Install with ansible-galaxy collection install community.general:==8.5.0
collections: - name: community.general version: 8.5.0
Get inventory hosts from the cobbler service.
Uses a configuration file as an inventory source, it must end in C(.cobbler.yml) or C(.cobbler.yaml) and have a C(plugin: cobbler) entry.
Adds the primary IP addresses to C(cobbler_ipv4_address) and C(cobbler_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.
url: default: http://cobbler/cobbler_api description: URL to cobbler. env: - name: COBBLER_SERVER user: description: Cobbler authentication user. env: - name: COBBLER_USER required: false cache: default: false description: - Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work. env: - name: ANSIBLE_INVENTORY_CACHE ini: - key: cache section: inventory type: bool group: default: cobbler description: Group to place all hosts into. plugin: choices: - cobbler - community.general.cobbler description: The name of this plugin, it should always be set to V(community.general.cobbler) for this plugin to recognize it as it's own. required: true group_by: default: - mgmt_classes - owners - status description: Keys to group hosts by. elements: string type: list password: description: Cobbler authentication password. env: - name: COBBLER_PASSWORD required: false want_facts: default: true description: Toggle, if V(true) the plugin will retrieve host facts from the server. type: boolean cache_plugin: default: memory description: - Cache plugin to use for the inventory's source data. env: - name: ANSIBLE_CACHE_PLUGIN - name: ANSIBLE_INVENTORY_CACHE_PLUGIN ini: - key: fact_caching section: defaults - key: cache_plugin section: inventory type: str cache_prefix: default: ansible_inventory_ description: - Prefix to use for cache plugin files/tables env: - name: ANSIBLE_CACHE_PLUGIN_PREFIX - name: ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX ini: - key: fact_caching_prefix section: defaults - key: cache_prefix section: inventory group_prefix: default: cobbler_ description: Prefix to apply to cobbler groups. cache_timeout: default: 3600 description: - Cache duration in seconds env: - name: ANSIBLE_CACHE_PLUGIN_TIMEOUT - name: ANSIBLE_INVENTORY_CACHE_TIMEOUT ini: - key: fact_caching_timeout section: defaults - key: cache_timeout section: inventory type: int cache_fallback: default: false description: Fallback to cached results if connection to cobbler fails. type: boolean cache_connection: description: - Cache connection data or path, read cache plugin documentation for specifics. env: - name: ANSIBLE_CACHE_PLUGIN_CONNECTION - name: ANSIBLE_INVENTORY_CACHE_CONNECTION ini: - key: fact_caching_connection section: defaults - key: cache_connection section: inventory type: str exclude_profiles: default: [] description: - Profiles to exclude from inventory. - Ignored if O(include_profiles) is specified. elements: str type: list include_profiles: default: [] description: - Profiles to include from inventory. - If specified, all other profiles will be excluded. - O(exclude_profiles) is ignored if O(include_profiles) is specified. elements: str type: list version_added: 4.4.0 version_added_collection: community.general want_ip_addresses: default: true description: - Toggle, if V(true) the plugin will add a C(cobbler_ipv4_addresses) and C(cobbleer_ipv6_addresses) dictionary to the defined O(group) mapping interface DNS names to IP addresses. type: boolean version_added: 7.1.0 version_added_collection: community.general inventory_hostname: choices: - hostname - system default: hostname description: - 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 V(system), the cobbler system name is used. type: str version_added: 7.1.0 version_added_collection: community.general exclude_mgmt_classes: default: [] description: Management classes to exclude from inventory. elements: str type: list version_added: 7.4.0 version_added_collection: community.general include_mgmt_classes: default: [] description: Management classes to include from inventory. elements: str type: list version_added: 7.4.0 version_added_collection: community.general