Skip to content

Latest commit

 

History

History
326 lines (303 loc) · 19.8 KB

cisco.sastre.attach_vsmart_module.rst

File metadata and controls

326 lines (303 loc) · 19.8 KB
source:attach_vsmart.py
orphan:

attach_vsmart -- Attach templates to Vsmarts

  • This attach module connects to SD-WAN vManage using HTTP REST to updated configuration data stored in local default backup or configured argument local backup folder or attach yml file. This module contains multiple arguments with connection and filter details to attach Vsmarts to templates. When multiple filters are defined, the result is an AND of all filters. Dry-run can be used to validate the expected outcome.The number of devices to include per attach request (to vManage) can be defined with the batch param.
Parameter Choices/Defaults Comments
activate
boolean
    Choices:
  • no ←
  • yes
Activate centralized policy after vSmart template attach/deploy.
address
string / required
vManage IP address or can also be defined via VMANAGE_IP environment variable
attach_file
string
load vsmart device templates attach and vsmart policy activate from attach YAML file
batch
integer
Default:
200
Maximum number of devices to include per vManage attach request.
config_groups
string
Regular expression selecting config-groups to deploy. Match on config-group name.
devices
string
Regular expression selecting devices to attach. Match on device name.
dryrun
boolean
    Choices:
  • no ←
  • yes
dry-run mode. Attach operations are listed but not is pushed to vManage.
password
string / required
password or can also be defined via VMANAGE_PASSWORD environment variable.
port
integer
Default:
8443
vManage port number or can also be defined via VMANAGE_PORT environment variable
reachable
boolean
    Choices:
  • no ←
  • yes
Select reachable devices only.
site
string
Select devices with site ID.
system_ip
string
Select device with system IP.
templates
string
Regular expression selecting templates to attach. Match on template name.
tenant
string
tenant name, when using provider accounts in multi-tenant deployments.
timeout
integer
Default:
300
vManage REST API timeout in seconds
user
string / required
username or can also be defined via VMANAGE_USER environment variable.
workdir
string
Default:
"backup_\u003caddress\u003e_\u003cyyyymmdd\u003e"
Defines the location (in the local machine) where vManage data files are located. By default, it follows the format "backup_<address>_<yyyymmdd>". The workdir argument can be used to specify a different location. workdir is under a 'data' directory. This 'data' directory is relative to the directory where Ansible script is run.

Note

  • Tested against 20.10
- name: "Attach vManage configuration"
  cisco.sastre.attach_vsmart:
    address: "198.18.1.10"
    port: 8443
    user: "admin"
    password:"admin"
    workdir: "backup_test_1"
    templates: ".*"
    config_groups: ".*"
    devices: ".*"
    reachable: True
    activate: True
    site: "1"
    system_ip: "12.12.12.12"
    dryrun: False
    batch: 99
- name: "Attach vManage configuration with some vManage config arguments saved in environment variables"
  cisco.sastre.attach_vsmart:
    workdir: "backup_test_2"
    templates: ".*"
    config_groups: ".*"
    devices: ".*"
    reachable: True
    activate: True
    site: "1"
    system_ip: "12.12.12.12"
    dryrun: True
    batch: 99
- name: "Attach vsmart device templates and vsmart policy activate from attach yml file"
  cisco.sastre.attach_vsmart:
    attach_file: "/path/to/attach.yml"
    batch: 99
- name: "Attach vManage configuration with all defaults"
  cisco.sastre.attach_vsmart:
    address: "198.18.1.10"
    user: admin
    password: admin