graphiant.naas.graphiant_backbone module – Manage Graphiant Core (backbone) device configuration
Note
This module is part of the graphiant.naas collection (version 26.5.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 graphiant.naas.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: graphiant.naas.graphiant_backbone.
New in graphiant.naas 26.5.0
Synopsis
Manage configuration of Graphiant Core (backbone) devices.
Supports full Core configuration push as well as targeted operations on core-to-core interfaces, core-to-core IPsec tunnels, WAN ISP circuits, direct-peer interfaces, and per-VRF syslog targets.
All payloads target the
corebranch of the device configuration (gsdk.put_device_config). This is the counterpart to graphiant.naas.graphiant_interfaces, which targets theedgebranch.The single config_yaml_file holds the full Core configuration; each operation slices the appropriate section (interfaces filtered by type / circuit prefix, site block, vrfs.syslogTargets, …) and pushes only that slice.
Configuration files support Jinja2 templating for dynamic generation.
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.7
graphiant-sdk >= 26.5.0
Parameters
Parameter |
Comments |
|---|---|
Bearer token for API authentication (for example, from If not passed as a module argument, the collection reads When a bearer token is present (module argument or environment), it takes precedence over If no valid token is available, the module authenticates with |
|
Path to the backbone (Core) interface configuration YAML file. Required for all operations. Can be an absolute path or relative path. Relative paths are resolved using the configured config_path. Configuration files support Jinja2 templating syntax for dynamic generation. File must contain a top-level `backbone_devices:` list, one entry per Core device with a `core:` block (name, regionName, site, interfaces, vrfs). |
|
Enable detailed logging output for troubleshooting and monitoring. Logs are captured and included in the result message for display using ansible.builtin.debug. Choices:
|
|
Graphiant portal host URL for API connectivity. Example: “https://api.graphiant.com” |
|
The specific backbone operation to perform.
Choices:
|
|
Graphiant portal password for authentication. Required for password-based login when no valid bearer token is available from |
|
Graphiant portal username for authentication. Required for password-based login when no valid bearer token is available from |
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: full When run with |
Supports check mode. In check mode, no configuration is pushed to the devices but payloads that would be pushed are logged with |
Notes
Note
Operations:
-
configure: Full Core configuration push (name + regionName + site + interfaces + vrfs).-
deconfigure: Orchestrated full teardown -- runs deconfigure for WAN ISP circuits, direct-peer, core-to-core tunnels, core-to-core interfaces, and syslog targets in dependency order.-
configure_core_to_core_interfaces/deconfigure_core_to_core_interfaces: core-to-core interfaces on `graphiant-core` (`loopback` / `core_to_core_link` with optional VLAN sub-interfaces / `disabled`).-
configure_core_to_core_tunnel_interfaces/deconfigure_core_to_core_tunnel_interfaces: core-to-core IPsec tunnel interfaces (`core_to_core_ipsec_tunnel`).-
configure_wan_circuits/deconfigure_wan_circuits: ISP transit interfaces with circuit names prefixed `isp-` (plus paired `p2mp_tunnel` entries).-
configure_direct_peer_interfaces/deconfigure_direct_peer_interfaces: direct-peer interfaces with circuit names prefixed `direct-peer-`.-
configure_syslog_targets/deconfigure_syslog_targets: per-VRF `syslogTargets` blocks under `core.vrfs.<vrf>`.The module automatically resolves device names to IDs and validates configurations.
Deconfigure operations reset interfaces to the enterprise default LAN (`default-<enterprise_id>`) and are idempotent (check device state via `gsdk.get_device_info` before building delete payloads).
Configuration files support Jinja2 templating syntax for dynamic configuration generation.
Check mode (
--check): No config is pushed; payloads that would be pushed are logged with[check_mode].
See Also
See also
- graphiant.naas.graphiant_interfaces
Configure interfaces and circuits on Graphiant Edge devices (counterpart for the
edgebranch).- graphiant.naas.graphiant_device_system
Configure `name`, `regionName`, and `site` on Edge or Core devices with full diff.
- graphiant.naas.graphiant_device_config
Push raw device configuration payloads for Edge, Gateway, and Core devices.
Examples
- name: Configure all backbone interfaces (full push)
graphiant.naas.graphiant_backbone:
operation: configure
config_yaml_file: "sample_backbone_config.yaml"
host: "{{ graphiant_host }}"
access_token: "{{ graphiant_access_token }}"
detailed_logs: true
- name: Configure core-to-core interfaces
graphiant.naas.graphiant_backbone:
operation: configure_core_to_core_interfaces
config_yaml_file: "sample_backbone_config.yaml"
host: "{{ graphiant_host }}"
access_token: "{{ graphiant_access_token }}"
- name: Configure core-to-core IPsec tunnels
graphiant.naas.graphiant_backbone:
operation: configure_core_to_core_tunnel_interfaces
config_yaml_file: "sample_backbone_config.yaml"
host: "{{ graphiant_host }}"
access_token: "{{ graphiant_access_token }}"
- name: Configure backbone WAN ISP circuit interfaces
graphiant.naas.graphiant_backbone:
operation: configure_wan_circuits
config_yaml_file: "sample_backbone_config.yaml"
host: "{{ graphiant_host }}"
access_token: "{{ graphiant_access_token }}"
- name: Configure backbone direct-peer interfaces
graphiant.naas.graphiant_backbone:
operation: configure_direct_peer_interfaces
config_yaml_file: "sample_backbone_direct_peer_config.yaml"
host: "{{ graphiant_host }}"
access_token: "{{ graphiant_access_token }}"
- name: Configure backbone syslog targets
graphiant.naas.graphiant_backbone:
operation: configure_syslog_targets
config_yaml_file: "sample_backbone_config.yaml"
host: "{{ graphiant_host }}"
access_token: "{{ graphiant_access_token }}"
- name: Deconfigure core-to-core interfaces
graphiant.naas.graphiant_backbone:
operation: deconfigure_core_to_core_interfaces
config_yaml_file: "sample_backbone_config.yaml"
host: "{{ graphiant_host }}"
access_token: "{{ graphiant_access_token }}"
- name: Deconfigure all backbone interfaces (orchestrated teardown)
graphiant.naas.graphiant_backbone:
operation: deconfigure
config_yaml_file: "sample_backbone_config.yaml"
host: "{{ graphiant_host }}"
access_token: "{{ graphiant_access_token }}"
detailed_logs: true
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Whether the operation pushed configuration changes.
Returned: always Sample: |
|
The interface configuration file used for the operation. Returned: always Sample: |
|
Result message from the operation, including detailed logs when Returned: always Sample: |
|
The operation that was performed. Returned: always Sample: |