diff --git a/.github/workflows/ansible-doc-validation.yml b/.github/workflows/ansible-doc-validation.yml index 0591bc7..f7ab2f0 100644 --- a/.github/workflows/ansible-doc-validation.yml +++ b/.github/workflows/ansible-doc-validation.yml @@ -1,4 +1,3 @@ -# .github/workflows/ansible-doc-validation.yml name: Ansible Doc Validation on: diff --git a/.github/workflows/galaxy-importer.yml b/.github/workflows/galaxy-importer.yml index aa6e771..29a959c 100644 --- a/.github/workflows/galaxy-importer.yml +++ b/.github/workflows/galaxy-importer.yml @@ -1,5 +1,3 @@ -# .github/workflows/galaxy-importer.yml - # Its role is to performe the same checks that would be performed when publishing to galaxy # Running them earlier helps to detect issues locally diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 1be7076..2ad7ba3 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -1,4 +1,3 @@ -# .github/workflows/ansible-lint.yml name: Static Code Analyzer on: diff --git a/.github/workflows/release-from-tag.yml b/.github/workflows/release-from-tag.yml index 61fafe0..65ab392 100644 --- a/.github/workflows/release-from-tag.yml +++ b/.github/workflows/release-from-tag.yml @@ -1,5 +1,3 @@ -# .github/workflows/galaxy-importer.yml - name: Release to ansible-galaxy from tag on: diff --git a/galaxy.yml b/galaxy.yml index 8dbcb4e..34efd9d 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,13 +1,13 @@ namespace: cisco name: catalystwan -version: 0.1.0 +version: 0.1.1 readme: README.md authors: - Arkadiusz Cichon - Kamil Górski description: Ansible collection to interact with Cisco SD-WAN vManage via catalystwan -repository: git@github.com:cisco-open/ansible-collection-catalystwan.git +repository: https://github.com/cisco-open/ansible-collection-catalystwan documentation: https://github.com/cisco-open/ansible-collection-catalystwan/blob/main/README.md homepage: https://github.com/cisco-open/ansible-collection-catalystwan issues: https://github.com/cisco-open/ansible-collection-catalystwan/issues diff --git a/meta/runtime.yml b/meta/runtime.yml index a1bfb88..f3a037e 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,5 +1,3 @@ --- -# Collections must specify a minimum required ansible version to upload -# to galaxy -requires_ansible: '>=2.13.13' +requires_ansible: '>=2.16.6' diff --git a/plugins/modules/administration_settings.py b/plugins/modules/administration_settings.py index c33d5a6..3adbe74 100644 --- a/plugins/modules/administration_settings.py +++ b/plugins/modules/administration_settings.py @@ -21,7 +21,7 @@ description: Configuration for controller certificate authorization. type: dict aliases: [cca, controller_certificate_authorization] - options: + suboptions: certificate_signing: description: Defines the certificate signing authority. type: str @@ -60,7 +60,7 @@ description: Smart Account credentials for authentication. type: dict aliases: [smart_account] - options: + suboptions: password: description: Password for Smart Account. type: str @@ -74,7 +74,7 @@ description: Configuration for vBond validator. type: dict aliases: [vbond] - options: + suboptions: domain_ip: description: Domain IP of the vBond validator. type: str @@ -84,7 +84,7 @@ software_install_timeout: description: Configuration for upgrades timeout. type: dict - options: + suboptions: download_timeout: description: Download Timeout in minutes, should be in range 60-360. type: int diff --git a/roles/activate_edges/README.md b/roles/activate_edges/README.md index 73b314f..046c4be 100644 --- a/roles/activate_edges/README.md +++ b/roles/activate_edges/README.md @@ -1 +1,59 @@ ---- \ No newline at end of file +# Ansible Role: activate_edges + +This Ansible role is designed to manage the activation process of Cisco Catalyst WAN Edge devices. +NOTE: Role must be used on localhost - API requests to Manager are done from local machine. + +## Role Description + +The `activate_edges` role ensure that Edge devices are properly synchronized and activated in the network. +It includes: + +- verifying variables +- retrieving the list of Edge devices +- syncing them with controllers +- waiting until the devices are reachable and have completed the OTP (One-Time Password) phase +- ensuring that certificates are installed, and the devices are reachable + +## Requirements + +- `cisco.catalystwan` collection installed. +- Access details for the Cisco Manager instance must be provided. + +## Dependencies + +There are no external role dependencies. Only `cisco.catalystwan` collection is required. + +## Role Variables + +Variables expected by this role, example: + +```yaml +vmanage_instances: + - mgmt_public_ip: '192.0.2.1' + admin_username: 'admin' + admin_password: 'password' +``` + +## Example Playbook + +Including an example of how to use your role (for instance, with variables passed in as parameters): + +```yaml +- hosts: localhost + gather_facts: no + roles: + - role: cisco.catalystwan.activate_edges + vars: + vmanage_instances: + - mgmt_public_ip: '192.0.2.1' + admin_username: 'admin' + admin_password: 'password' +``` + +## License + +"GPL-3.0-only" + +## Author Information + +This role was created by Arkadiusz Cichon diff --git a/roles/administration_settings/README.md b/roles/administration_settings/README.md index 73b314f..689d71d 100644 --- a/roles/administration_settings/README.md +++ b/roles/administration_settings/README.md @@ -1 +1,74 @@ ---- \ No newline at end of file +# Ansible Role: administration_settings + +This Ansible role is designed to manage the initial configuration of Cisco Manager devices and administration settings. +NOTE: Role must be used on localhost - API requests to Manager are done from local machine. + +## Role Description + +Key tasks: + +- inform the user to manually verify that their PnP Portal Controller Profile is up to date with the vBond and organization name, pausing execution until the user confirms +- verifying variables +- setting iinitial configuration via administration settings + +## Requirements + +- `cisco.catalystwan` collection installed. +- Access details for the Cisco Manager instance must be provided. + +## Dependencies + +There are no external role dependencies. Only `cisco.catalystwan` collection is required. + +## Role Variables + +Variables expected by this role: + +- `vbond_transport_public_ip`: The public IP of the vBond transport. +- `organization_name`: The name of the organization. +- `validator_port`: The port used by the validator. +- `pnp_username`: The username for the PnP service account. +- `pnp_password`: The password for the PnP service account. +- `vmanage_instances`: A list of vManage instances, each containing management IP, admin username, and admin password. + +Example of `vmanage_instances`: + +```yaml +vmanage_instances: + - hostname: 'vmanage01' + system_ip: '192.0.2.10' + mgmt_public_ip: '198.51.100.10' + admin_username: 'admin' + admin_password: 'password' +``` + +## Example Playbook + +Including an example of how to use your role (with variables passed in as parameters): + +```yaml +- hosts: localhost + gather_facts: no + roles: + - role: cisco.catalystwan.activate_edges + vars: + vbond_transport_public_ip: '203.0.113.100' + organization_name: 'MyOrganization' + validator_port: '12345' + pnp_username: 'pnp_user' + pnp_password: 'pnp_pass' + vmanage_instances: + - hostname: 'vmanage01' + system_ip: '192.0.2.10' + mgmt_public_ip: '198.51.100.10' + admin_username: 'admin' + admin_password: 'password' +``` + +## License + +"GPL-3.0-only" + +## Author Information + +This role was created by Arkadiusz Cichon diff --git a/roles/administration_settings/defaults/main.yml b/roles/administration_settings/defaults/main.yml new file mode 100644 index 0000000..3aaa523 --- /dev/null +++ b/roles/administration_settings/defaults/main.yml @@ -0,0 +1,3 @@ +--- + +validator_port: "12346" diff --git a/roles/administration_settings/tasks/main.yml b/roles/administration_settings/tasks/main.yml index 6749d1a..814864b 100644 --- a/roles/administration_settings/tasks/main.yml +++ b/roles/administration_settings/tasks/main.yml @@ -24,12 +24,12 @@ cisco.catalystwan.administration_settings: validator: domain_ip: "{{ vbond_transport_public_ip }}" - port: "12346" # should be customizable + port: "{{ validator_port }}" organization: "{{ organization_name }}" certificates: retrieve_interval: "2" pnp_connect_sync: "on" - smart_account_credentials: # GET the info about how Shivram's config failed because of the missing PnP controller profile + smart_account_credentials: username: "{{ pnp_username }}" password: "{{ pnp_password }}" manager_authentication: diff --git a/roles/administration_settings/tasks/variables_assertion.yml b/roles/administration_settings/tasks/variables_assertion.yml index f1bdfb2..fc16351 100644 --- a/roles/administration_settings/tasks/variables_assertion.yml +++ b/roles/administration_settings/tasks/variables_assertion.yml @@ -19,7 +19,7 @@ - "{{ vmanage_instances }}" - "{{ vbond_instances }}" - "{{ organization_name }}" - - "{{ vbond_instances[0].transport_public_ip }}" + - "{{ (vbond_instances | first).transport_public_ip }}" loop_control: loop_var: required_var diff --git a/roles/api_ready/README.md b/roles/api_ready/README.md index 73b314f..464ecf0 100644 --- a/roles/api_ready/README.md +++ b/roles/api_ready/README.md @@ -1 +1,55 @@ ---- \ No newline at end of file +# Ansible Role: api_ready + +This Ansible role is designed to verify Manager API server readiness. +NOTE: Role must be used on localhost - API requests to Manager are done from local machine. + +## Role Description + +Key tasks: + +- verifying variables +- check that API server is ready + +## Requirements + +- `cisco.catalystwan` collection installed. +- Access details for the Cisco Manager instance must be provided. + +## Dependencies + +There are no external role dependencies. Only `cisco.catalystwan` collection is required. + +## Role Variables + +Example of `vmanage_instances`: + +```yaml +vmanage_instances: + - mgmt_public_ip: '198.51.100.10' + admin_username: 'admin' + admin_password: 'password' +``` + +## Example Playbook + +Including an example of how to use your role (with variables passed in as parameters): + +```yaml +- hosts: localhost + gather_facts: no + roles: + - role: cisco.catalystwan.api_ready + vars: + vmanage_instances: + - mgmt_public_ip: '198.51.100.10' + admin_username: 'admin' + admin_password: 'password' +``` + +## License + +"GPL-3.0-only" + +## Author Information + +This role was created by Arkadiusz Cichon diff --git a/roles/health_checks/README.md b/roles/health_checks/README.md index 73b314f..a97bdd9 100644 --- a/roles/health_checks/README.md +++ b/roles/health_checks/README.md @@ -1 +1,62 @@ ---- \ No newline at end of file +# Ansible Role: health_checks + +This Ansible role performs health checks on Cisco vManage devices. + +## Role Description + +The `health_checks` role runs a series of health checks to ensure that the Cisco SD-WAN environment is operating as expected. It checks the state of various connections and sessions to validate their status: + +- control connections +- orchestrator connections +- BFD sessions +- OMP sessions + +## Requirements + +- `cisco.catalystwan` collection installed. +- Access details for the Cisco Manager instance must be provided. + +## Dependencies + +There are no external role dependencies. Only `cisco.catalystwan` collection is required. + +## Role Variables + +Variables expected by this role: + +- `vmanage_instances`: List of vManage instances containing management IP, admin username, and admin password. + +Example: + +```yaml +vmanage_instances: + - mgmt_public_ip: '192.0.2.1' + admin_username: 'admin' + admin_password: 'password' +``` + +## Example Playbook + +Including an example of how to use your role (for instance, with variables passed in as parameters): + +```yaml +- hosts: localhost + gather_facts: no + tasks: + - name: Run health_checks + import_role: + name: health_checks + vars: + vmanage_instances: + - mgmt_public_ip: '192.0.2.1' + admin_username: 'admin' + admin_password: 'password' +``` + +## License + +"GPL-3.0-only" + +## Author Information + +This role was created by Arkadiusz Cichon diff --git a/roles/onboarding_controllers/README.md b/roles/onboarding_controllers/README.md index 73b314f..f1b5abc 100644 --- a/roles/onboarding_controllers/README.md +++ b/roles/onboarding_controllers/README.md @@ -1 +1,82 @@ ---- \ No newline at end of file +# Ansible Role: onboarding_controllers + +This Ansible role facilitates the onboarding process for Cisco SD-WAN controllers, including vManage, vSmart, and vBond devices. It handles certificate signing requests (CSRs) generation, controller additions, and validation of the device onboarding status. + +## Role Description + +The `onboarding_controllers` role performs the following tasks: + +1. Verifies that all required variables for the role are set. +2. Generates CSRs for vManage devices. +3. Adds vSmart devices and registers the result of the addition. +4. Adds vBond devices and registers the result of the addition. +5. Waits until all controller devices are discoverable via system IP. +6. Waits until the certificate install status is "Installed" on all controllers. + +## Requirements + +- `cisco.catalystwan` collection installed. +- Access details for the Cisco Manager instance must be provided. + +## Dependencies + +There are no external role dependencies. Only `cisco.catalystwan` collection is required. + +## Role Variables + +Variables expected by this role: + +- `vmanage_instances`: A list of vManage instances containing management IP, admin username, and admin password. +- `vsmart_instances`: A list of vSmart instances containing necessary details for onboarding. +- `vbond_instances`: A list of vBond instances containing necessary details for onboarding. + +Example of `vmanage_instances`: + +```yaml +vmanage_instances: + - hostname: 'vmanage01' + system_ip: '192.0.2.10' + mgmt_public_ip: '198.51.100.10' + admin_username: 'admin' + admin_password: 'password' +``` + +## Example Playbook + +Including an example of how to use your role (with variables passed in as parameters): + +```yaml +- hosts: localhost + gather_facts: no + tasks: + - name: Run onboarding_controllers + import_role: + name: onboarding_controllers + vars: + vmanage_instances: + - hostname: 'vmanage01' + system_ip: '192.0.2.10' + mgmt_public_ip: '198.51.100.10' + admin_username: 'admin' + admin_password: 'password' + vsmart_instances: + - hostname: 'vsmart01' + system_ip: '192.0.2.20' + transport_public_ip: '203.0.113.10' + admin_username: 'admin' + admin_password: 'password' + vbond_instances: + - hostname: 'vbond01' + system_ip: '192.0.2.30' + transport_public_ip: '203.0.113.20' + admin_username: 'admin' + admin_password: 'password' +``` + +## License + +"GPL-3.0-only" + +## Author Information + +This role was created by Arkadiusz Cichon diff --git a/roles/remove_controllers/README.md b/roles/remove_controllers/README.md index 73b314f..58fafc3 100644 --- a/roles/remove_controllers/README.md +++ b/roles/remove_controllers/README.md @@ -1 +1,62 @@ ---- \ No newline at end of file +# Ansible Role: remove_controllers + +This Ansible role is designed to remove all discoverable Cisco SD-WAN controllers, including vManage, vSmart, and vBond devices, from the Cisco vManage inventory. + +## Role Description + +The `remove_controllers` role executes the following tasks: + +1. Verifies that all required variables for the role are set. +2. Gathers information about all controllers currently recognized in the Cisco vManage inventory. +3. Removes all discoverable controllers by setting their state to invalidated. + +## Requirements + +- `cisco.catalystwan` collection installed. +- Access details for the Cisco Manager instance must be provided. + +## Dependencies + +There are no external role dependencies. Only `cisco.catalystwan` collection is required. + + +## Role Variables + +Variables expected by this role: + +- `vmanage_instances`: A list of vManage instances containing management IP, admin username, and admin password. + +Example of `vmanage_instances`: + +```yaml +vmanage_instances: + - mgmt_public_ip: '192.0.2.1' + admin_username: 'admin' + admin_password: 'password' +``` + +## Example Playbook + +Including an example of how to use your role (with variables passed in as parameters): + +```yaml +- hosts: all + gather_facts: localhost + tasks: + - name: Run remove_controllers + import_role: + name: remove_controllers + vars: + vmanage_instances: + - mgmt_public_ip: '192.0.2.1' + admin_username: 'admin' + admin_password: 'password' +``` + +## License + +"GPL-3.0-only" + +## Author Information + +This role was created by Arkadiusz Cichon diff --git a/roles/remove_edges/README.md b/roles/remove_edges/README.md index 73b314f..fed4ffd 100644 --- a/roles/remove_edges/README.md +++ b/roles/remove_edges/README.md @@ -1 +1,63 @@ ---- \ No newline at end of file +# Ansible Role: remove_edges + +This Ansible role is responsible for removing all Edge devices (vEdges) from a Cisco SD-WAN environment managed by Cisco vManage. + +## Role Description + +The `remove_edges` role executes a sequence of tasks that: + +1. Verifies the necessary role-specific variables are set. +2. Retrieves the list of all Edge devices in the Cisco SD-WAN environment. +3. Invalidates Edge devices certificates before deletion. +4. Sends updates to controllers to propagate the changes. +5. Removes all Edge devices from the vManage inventory. + +## Requirements + +- `cisco.catalystwan` collection installed. +- Access details for the Cisco Manager instance must be provided. + +## Dependencies + +There are no external role dependencies. Only `cisco.catalystwan` collection is required. + +## Role Variables + +Variables expected by this role: + +- `vmanage_instances`: A list of vManage instances containing management IP, admin username, and admin password. + +Example of `vmanage_instances`: + +```yaml +vmanage_instances: + - mgmt_public_ip: '192.0.2.1' + admin_username: 'admin' + admin_password: 'password' +``` + +## Example Playbook + +Including an example of how to use your role (with variables passed in as parameters): + +```yaml +- hosts: localhost + gather_facts: no + tasks: + - name: Run remove_edges + import_role: + name: remove_edges + vars: + vmanage_instances: + - mgmt_public_ip: '192.0.2.1' + admin_username: 'admin' + admin_password: 'password' +``` + +## License + +"GPL-3.0-only" + +## Author Information + +This role was created by Arkadiusz Cichon diff --git a/roles/software_upgrades_remote/README.md b/roles/software_upgrades_remote/README.md index 73b314f..eefb1c5 100644 --- a/roles/software_upgrades_remote/README.md +++ b/roles/software_upgrades_remote/README.md @@ -1 +1,86 @@ ---- \ No newline at end of file +# Ansible Role: software_upgrades_remote + +This Ansible role is designed to perform software upgrades on Cisco SD-WAN devices using a remote server. It covers the entire workflow for upgrading vManage, vBond, vSmar devices using software images stored on a remote server configured with SCP. + +## Role Description + +The `software_upgrades_remote` role performs the following tasks: + +1. Verifies that required variables for the role are present. +2. Informs the user to ensure the FTP server is correctly configured for remote server upgrades. +3. Configures the remote server within Cisco vManage. +4. Retrieves and validates the list of remote server repositories. +5. Uploads software images from the remote server to the Cisco vManage software repository. +6. Filters and asserts the presence of required software images in the vManage software repository. +7. Executes software upgrade operations on vManage, vBond, and vSmart controllers. +8. Sets the default software version on the controllers. +9. Cleans up available software images from the controllers if desired. +10. Verifies that the activated version is set as the current and default version. + +## Requirements + +- `cisco.catalystwan` collection installed. +- Access details for the Cisco Manager instance must be provided. + +## Dependencies + +There are no external role dependencies. Only `cisco.catalystwan` collection is required. + +## Role Variables + +Variables expected by this role: + +- `vmanage_instances`: List of vManage instances containing management IP, admin username, and admin password. +- `remote_server_name`: Name of the remote server to be used. +- `remote_server_url`: URL of the remote server. +- `remote_server_user`: Username for the remote server. +- `remote_server_password`: Password for the remote server. +- `remote_server_image_location_prefix`: Prefix for the image location on the remote server. +- `vmanage_remote_software_filename`: Software image filename for vManage. +- `viptela_remote_software_filename`: Software image filename for vBond and vSmart. +- `cedge_remote_software_filename`: Software image filename for cEdge. +- `controller_software_version_to_activate`: Version of the software to activate on controllers. +- `edge_software_version_to_activate`: Version of the software to activate on cEdge devices. +- `remove_available_software_from_device`: Boolean indicating whether to remove software from the device post-upgrade. + +## Example Playbook + +Including an example of how to use your role (with variables passed in as parameters): + +```yaml +- hosts: localhost + gather_facts: no + tasks: + - name: Run software_upgrades_remote + import_role: + name: software_upgrades_remote + vars: + vmanage_instances: + - mgmt_public_ip: '192.0.2.1' + admin_username: 'admin' + admin_password: 'password' + remote_server_name: 'my_remote_server' + remote_server_url: 'scp://my.remote.server' + remote_server_user: 'remote_user' + remote_server_password: 'remote_password' + remote_server_image_location_prefix: '/images' + vmanage_remote_software_filename: 'viptela-vmanage-genericx86-64.zip' + viptela_remote_software_filename: 'viptela-edge-genericx86-64.zip' + cedge_remote_software_filename: 'c8000v-universalk9.17.XX.XX.X.XXX_V17_XX_X.SSA.bin' + controller_software_version_to_activate: '20.3.1' + edge_software_version_to_activate: '20.3.1' + remove_available_software_from_device: true +``` + +## Known Limitations + +- The role assumes that controllers are <20.13 version. +- Upgrades of cEdges from Remote Server are currently not included + +## License + +"GPL-3.0-only" + +## Author Information + +This role was created by Arkadiusz Cichon diff --git a/roles/sync_pnp_edges/README.md b/roles/sync_pnp_edges/README.md index 73b314f..1e5276b 100644 --- a/roles/sync_pnp_edges/README.md +++ b/roles/sync_pnp_edges/README.md @@ -1 +1,72 @@ ---- \ No newline at end of file +# Ansible Role: sync_pnp_edges + +This Ansible role is designed to automate the process of synchronizing WAN Edge devices with Cisco's Plug and Play (PnP) portal and generating bootstrap configurations for Cisco SD-WAN devices. It also provides the capability to upload a custom WAN Edge list and to generate a file with edge deployment configurations. + +## Role Description + +The `sync_pnp_edges` role performs the following tasks: + +1. Verifies that required variables for the role are present. +2. Informs the user that devices must be defined in the PnP Portal before synchronization can occur. +3. Optionally uploads a WAN Edge list if a path to the list is provided. +4. Synchronizes devices with the Smart Account if no WAN Edge list is provided by the user. +5. Generates bootstrap configurations for all devices in the Smart Account. +6. Initializes an empty dictionary to store generated data for edge instances. +7. Generates entries for the edge instances based on the bootstrap configurations. +8. Creates a file containing the edge deployment configuration data. + +## Requirements + +- `cisco.catalystwan` collection installed. +- Access details for the Cisco Manager instance must be provided. + +## Dependencies + +There are no external role dependencies. Only `cisco.catalystwan` collection is required. + +## Role Variables + +Variables expected by this role: + +- `vmanage_instances`: List of vManage instances containing management IP, admin username, and admin password. +- `wan_edge_list_path`: Optional path to the custom WAN Edge list. +- `pnp_username`: Username for the PnP Portal. +- `pnp_password`: Password for the PnP Portal. +- `organization_name`: Name of the organization to prefix to the hostname of the edge devices. +- `deployment_edges_config`: Path where the edge deployment configuration file will be stored. + +## Example Playbook + +Including an example of how to use your role (with variables passed in as parameters): + +```yaml +- hosts: all + gather_facts: no + tasks: + - name: Synchronize WAN Edges and Generate Configurations + import_role: + name: sync_pnp_edges + vars: + vmanage_instances: + - mgmt_public_ip: '192.0.2.1' + admin_username: 'admin' + admin_password: 'password' + wan_edge_list_path: '/path/to/custom/wan_edge_list.csv' + pnp_username: 'pnp_user' + pnp_password: 'pnp_pass' + organization_name: 'myorg' + deployment_edges_config: '/path/to/deployment_edges_config.yml' +``` + +## Known Limitations + +- The role assumes that the PnP Portal has been configured and that devices are already registered. +- The role does not cover the registration of new devices to the PnP Portal. + +## License + +"GPL-3.0-only" + +## Author Information + +This role was created by Arkadiusz Cichon diff --git a/roles/vmanage_mode/README.md b/roles/vmanage_mode/README.md index 73b314f..576acc6 100644 --- a/roles/vmanage_mode/README.md +++ b/roles/vmanage_mode/README.md @@ -1 +1,66 @@ ---- \ No newline at end of file +# Ansible Role: vmanage_mode + +This Ansible role is designed to configure the operational mode of Cisco SD-WAN devices within a vManage environment. It can be used to set the mode for both controller (vSmart, vBond, vManage) and Edge (vEdge, cEdge) devices. + +## Role Description + +The `vmanage_mode` role performs the following tasks: + +1. Verifies that the required variables for the role are present. +2. Sets the vManage mode for all controller devices including vSmart, vBond, and vManage instances. +3. Optionally sets the vManage mode for all Edge devices if `edge_instances` are defined. + +## Requirements + +- `cisco.catalystwan` collection installed. +- Access details for the Cisco Manager instance must be provided. + +## Dependencies + +There are no external role dependencies. Only `cisco.catalystwan` collection is required. + +## Role Variables + +Variables expected by this role: + +- `vmanage_instances`: List of vManage instances containing management IP, admin username, and admin password. +- `vsmart_instances`: List of vSmart controller instances with hostnames. +- `vbond_instances`: List of vBond controller instances with hostnames. +- `edge_instances`: Optional list of Edge device instances with hostnames. + +## Example Playbook + +Including an example of how to use your role (with variables passed in as parameters): + +```yaml +- hosts: all + gather_facts: no + tasks: + - name: Configure vManage Mode for Controllers and Edges + import_role: + name: vmanage_mode + vars: + vmanage_instances: + - mgmt_public_ip: '192.0.2.1' + admin_username: 'admin' + admin_password: 'password' + vsmart_instances: + - hostname: 'vsmart01' + vbond_instances: + - hostname: 'vbond01' + edge_instances: + - hostname: 'vedge01' +``` + +## Known Limitations + +- The role assumes that the vManage, vSmart, vBond, and Edge devices are already registered and accessible within the vManage environment. +- The role does not cover initial device registration or provisioning in vManage. + +## License + +"GPL-3.0-only" + +## Author Information + +This role was created by Arkadiusz Cichon