cisco.mso.ndo_set_rule_policy module – Manage Tenant Set Rule Policies on Cisco Nexus Dashboard Orchestrator (NDO).
Note
This module is part of the cisco.mso collection (version 2.12.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 cisco.mso.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: cisco.mso.ndo_set_rule_policy.
New in cisco.mso 2.12.0
Synopsis
Manage Tenant Set Rule Policies on Cisco Nexus Dashboard Orchestrator (NDO).
This module is only supported on ND v4.1 (NDO v5.1) and later.
Requirements
The below requirements are needed on the host that executes this module.
Multi Site Orchestrator v2.1 or newer
Parameters
Parameter |
Comments |
|---|---|
The description of the Set Rule Policy. |
|
IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable |
|
The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable When using a HTTPAPI connection plugin the inventory variable |
|
The name of the Set Rule Policy. |
|
Influence the output of this MSO module.
If the value is not specified in the task, the value of environment variable Choices:
|
|
The password to use for authentication. If the value is not specified in the task, the value of environment variables |
|
Port number to be used for the REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable |
|
The append list of communities to configure in the Set Rule Policy. Providing an empty list will remove the |
|
The Autonomous System (AS) path rules to add to the Set Rule Policy. Providing an empty dictionary will remove the |
|
The prepend last AS count. The value must be between 1 and 10. |
|
The list of path AS numbers to prepend. Providing an empty list will remove the |
|
The AS number. The value must be between 1 and 10. |
|
The order of the AS number. The value must be between 0 and 31. |
|
The community rule to add to the Set Rule Policy. Providing an empty dictionary will remove the |
|
The community value. |
|
The criteria to be applied to the community value. Choices:
|
|
The dampening rule to add to the Set Rule Policy. Providing an empty dictionary will remove the |
|
The half life time in minutes. The value must be between 1 and 60. |
|
The maximum suppress time in minutes. The value must be between 1 and 255. |
|
The re-use limit. The value must be between 1 and 20000. |
|
The suppress limit. The value must be between 1 and 20000. |
|
The metric rule to add to the Set Rule Policy. The value must be between 0 and 999999999. Providing an empty string will remove the |
|
The type of metric rule to add to the Set Rule Policy. Providing an empty string will remove the Choices:
|
|
The multipath option to add to the Set Rule Policy. Providing a value of Enabling multipath requires Choices:
|
|
The next hop rule to add to the Set Rule Policy. The value must be a valid IPv4 or IPv6 address. Providing an empty string will remove the |
|
The next hop propagation value to add to the Set Rule Policy. Providing a value of
Choices:
|
|
The preference rule to add to the Set Rule Policy. The value must be between 0 and 999999999. Providing an empty string will remove the |
|
The route tag rule to add to the Set Rule Policy. The value must be a number between 0 and 999999999. Providing an empty string will remove the |
|
The weight rule to add to the Set Rule Policy. The value must be a number between 0 and 9999. Providing an empty string will remove the |
|
Determines the desired state of the resource. Use Use Use Choices:
|
|
The name of the template. The template must be a tenant template. This parameter or |
|
The ID of the tenant template. This parameter or |
|
The socket level timeout in seconds. The default value is 30 seconds. If the value is not specified in the task, the value of environment variable |
|
If If the value is not specified in the task, the value of environment variable The default is Choices:
|
|
If If the value is not specified in the task, the value of environment variable When using a HTTPAPI connection plugin the inventory variable The default is Choices:
|
|
The username to use for authentication. If the value is not specified in the task, the value of environment variables |
|
The UUID of the Set Rule Policy. This parameter is required when the |
|
If This should only set to If the value is not specified in the task, the value of environment variable The default is Choices:
|
Notes
Note
The
templatemust exist before using this module in your playbook. Use cisco.mso.ndo_template to create the Tenant template.This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions.
See Also
See also
- cisco.mso.ndo_template
Manage Templates on Cisco Nexus Dashboard Orchestrator (NDO).
Examples
- name: Create a new Set Rule Policy
cisco.mso.ndo_set_rule_policy:
host: mso_host
username: admin
password: SomeSecretPassword
template: tenant_template
name: set_rule_policy_1
description: Ansible Set Rule Policy
set_community:
community: no-export
criteria: replace
set_additional_community:
- no-advertise
- extended:color:35
set_route_tag: 500
set_dampening:
half_life: 15
reuse_limit: 750
suppress_limit: 2000
max_suppress_time: 60
set_weight: 50
set_next_hop: 'aa::'
set_preference: 200
set_metric: 100
set_metric_type: type2
set_as_path:
last_asn_count: 10
path_asn_list:
- order: 11
asn: 1
- order: 10
asn: 2
state: present
register: create_set_rule_policy_1
- name: Update the name of the Set Rule Policy using UUID
cisco.mso.ndo_set_rule_policy:
host: mso_host
username: admin
password: SomeSecretPassword
template_id: "{{ create_tenant.current.templateId }}"
uuid: "{{ create_set_rule_policy_1.current.uuid }}"
name: set_rule_policy_1_updated
state: present
register: update_set_rule_policy_1
- name: Query an existing Set Rule Policy using UUID
cisco.mso.ndo_set_rule_policy:
host: mso_host
username: admin
password: SomeSecretPassword
template: tenant_template
uuid: "{{ create_set_rule_policy_1.current.uuid }}"
state: query
register: query_with_uuid
- name: Query an existing Set Rule Policy using name
cisco.mso.ndo_set_rule_policy:
host: mso_host
username: admin
password: SomeSecretPassword
template: tenant_template
name: set_rule_policy_1_updated
state: query
register: query_with_name
- name: Query all Set Rule Policies
cisco.mso.ndo_set_rule_policy:
host: mso_host
username: admin
password: SomeSecretPassword
template: tenant_template
state: query
register: query_all
- name: Remove set rules from a Set Rule Policy
cisco.mso.ndo_set_rule_policy:
host: mso_host
username: admin
password: SomeSecretPassword
template: tenant_template
name: set_rule_policy_1_updated
set_additional_community: []
set_community: {}
set_route_tag: ''
set_propagate_next_hop: false
state: present
- name: Delete an existing Set Rule Policy using UUID
cisco.mso.ndo_set_rule_policy:
host: mso_host
username: admin
password: SomeSecretPassword
template: tenant_template
uuid: "{{ create_set_rule_policy_1.current.uuid }}"
state: absent
- name: Delete an existing Set Rule Policy using Name
cisco.mso.ndo_set_rule_policy:
host: mso_host
username: admin
password: SomeSecretPassword
template: tenant_template
name: set_rule_policy_1_updated
state: absent