graphiant.naas.graphiant_global_config module – Manage Graphiant global configuration objects
Note
This module is part of the graphiant.naas collection (version 26.3.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_global_config.
New in graphiant.naas 25.11.0
Synopsis
This module provides comprehensive global configuration object management for Graphiant devices.
Supports multiple global object types: prefix sets, BGP & Graphiant filters, SNMP services, syslog services, NTP services, IPFIX services, VPN profiles, and LAN segments.
Can manage all object types together using general operations or specific object types individually.
All operations use Jinja2 templates for consistent configuration deployment.
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.7
graphiant-sdk >= 26.3.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 global 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 the appropriate global object definitions based on the operation type. |
|
Enable detailed logging output for troubleshooting and monitoring. When enabled, provides comprehensive logs of all global configuration operations. Logs are captured and included in the result_msg for display using ansible.builtin.debug module. Choices:
|
|
Graphiant portal host URL for API connectivity. Example: “https://api.graphiant.com” |
|
The specific global configuration 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
Check mode (
--check): No config is pushed; payloads that would be pushed are logged with[check_mode].Global Configuration Operations:
- General operations (
configure,deconfigure): - Automatically detect and process all configuration types in the YAML file.- Specific operations (
configure_*,deconfigure_*): - Process only the specific configuration type.Configuration files support Jinja2 templating syntax for dynamic configuration generation.
The module automatically resolves names to IDs for sites, LAN segments, and other referenced objects.
All operations are idempotent and safe to run multiple times.
Global objects can be referenced by other modules (BGP, Sites, Data Exchange) after creation.
When both
operationandstateare provided,operationtakes precedence.
See Also
See also
- graphiant.naas.graphiant_bgp
Attach global BGP filters to BGP peers
- graphiant.naas.graphiant_sites
Attach global objects to sites
- graphiant.naas.graphiant_data_exchange
Use global LAN segments and VPN profiles in Data Exchange workflows
Examples
- name: Configure all global objects (general operation)
graphiant.naas.graphiant_global_config:
operation: configure
config_file: "sample_global_prefix_lists.yaml"
host: "{{ graphiant_host }}"
username: "{{ graphiant_username }}"
password: "{{ graphiant_password }}"
detailed_logs: true
- name: Configure global prefix sets (specific operation)
graphiant.naas.graphiant_global_config:
operation: configure_prefix_sets
config_file: "sample_global_prefix_lists.yaml"
host: "{{ graphiant_host }}"
username: "{{ graphiant_username }}"
password: "{{ graphiant_password }}"
detailed_logs: true
- name: Configure global BGP filters
graphiant.naas.graphiant_global_config:
operation: configure_bgp_filters
config_file: "sample_global_bgp_filters.yaml"
host: "{{ graphiant_host }}"
username: "{{ graphiant_username }}"
password: "{{ graphiant_password }}"
detailed_logs: true
- name: Configure global Graphiant filters
graphiant.naas.graphiant_global_config:
operation: configure_graphiant_filters
config_file: "sample_global_graphiant_filters.yaml"
host: "{{ graphiant_host }}"
username: "{{ graphiant_username }}"
password: "{{ graphiant_password }}"
detailed_logs: true
- name: Deconfigure global Graphiant filters
graphiant.naas.graphiant_global_config:
operation: deconfigure_graphiant_filters
config_file: "sample_global_graphiant_filters.yaml"
host: "{{ graphiant_host }}"
username: "{{ graphiant_username }}"
password: "{{ graphiant_password }}"
detailed_logs: true
- name: Configure global LAN segments
graphiant.naas.graphiant_global_config:
operation: configure_lan_segments
config_file: "sample_global_lan_segments.yaml"
host: "{{ graphiant_host }}"
username: "{{ graphiant_username }}"
password: "{{ graphiant_password }}"
detailed_logs: true
- name: Configure global VPN profiles
graphiant.naas.graphiant_global_config:
operation: configure_vpn_profiles
config_file: "sample_global_vpn_profiles.yaml"
host: "{{ graphiant_host }}"
username: "{{ graphiant_username }}"
password: "{{ graphiant_password }}"
detailed_logs: true
- name: Configure global NTP objects
graphiant.naas.graphiant_global_config:
operation: configure_ntps
config_file: "sample_global_ntp.yaml"
host: "{{ graphiant_host }}"
username: "{{ graphiant_username }}"
password: "{{ graphiant_password }}"
detailed_logs: true
- name: Configure global site lists
graphiant.naas.graphiant_global_config:
operation: configure_site_lists
config_file: "sample_global_site_lists.yaml"
host: "{{ graphiant_host }}"
username: "{{ graphiant_username }}"
password: "{{ graphiant_password }}"
detailed_logs: true
- name: Deconfigure global prefix sets
graphiant.naas.graphiant_global_config:
operation: deconfigure_prefix_sets
config_file: "sample_global_prefix_lists.yaml"
host: "{{ graphiant_host }}"
username: "{{ graphiant_username }}"
password: "{{ graphiant_password }}"
- name: Deconfigure all global objects using state parameter
graphiant.naas.graphiant_global_config:
state: absent
config_file: "sample_global_prefix_lists.yaml"
host: "{{ graphiant_host }}"
username: "{{ graphiant_username }}"
password: "{{ graphiant_password }}"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Whether the operation made changes to the system.
Returned: always Sample: |
|
The 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. One of Returned: always Sample: |