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.13.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 |
|---|---|
description string | The description of the Set Rule Policy. |
host aliases: hostname string | 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 |
login_domain string | 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 |
name aliases: set_rule_policy string | The name of the Set Rule Policy. |
output_level string | Influence the output of this MSO module.
If the value is not specified in the task, the value of environment variable Choices:
|
password string | The password to use for authentication. If the value is not specified in the task, the value of environment variables |
port integer | 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 |
set_additional_community aliases: set_add_communities list / elements=string | The append list of communities to configure in the Set Rule Policy. Providing an empty list will remove the |
set_as_path dictionary | The Autonomous System (AS) path rules to add to the Set Rule Policy. Providing an empty dictionary will remove the |
|
last_asn_count integer |
The prepend last AS count. The value must be between 1 and 10. |
|
path_asn_list list / elements=dictionary |
The list of path AS numbers to prepend. Providing an empty list will remove the |
|
asn integer / required |
The AS number. The value must be between 1 and 10. |
|
order integer / required |
The order of the AS number. The value must be between 0 and 31. |
set_community dictionary | The community rule to add to the Set Rule Policy. Providing an empty dictionary will remove the |
|
community string |
The community value. |
|
criteria string |
The criteria to be applied to the community value. Choices:
|
set_dampening dictionary | The dampening rule to add to the Set Rule Policy. Providing an empty dictionary will remove the |
|
half_life integer |
The half life time in minutes. The value must be between 1 and 60. |
|
max_suppress_time integer |
The maximum suppress time in minutes. The value must be between 1 and 255. |
|
reuse_limit integer |
The re-use limit. The value must be between 1 and 20000. |
|
suppress_limit integer |
The suppress limit. The value must be between 1 and 20000. |
set_metric string | 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 |
set_metric_type string | The type of metric rule to add to the Set Rule Policy. Providing an empty string will remove the Choices:
|
set_multi_path boolean | The multipath option to add to the Set Rule Policy. Providing a value of Enabling multipath requires Choices:
|
set_next_hop string | 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 |
set_next_hop_propagate boolean | The next hop propagation value to add to the Set Rule Policy. Providing a value of
Choices:
|
set_preference string | 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 |
set_route_tag string | 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 |
set_weight string | 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 |
state string | Determines the desired state of the resource. Use Use Use Choices:
|
template string | The name of the template. The template must be a tenant template. This parameter or |
template_id string | The ID of the tenant template. This parameter or |
timeout integer | 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 |
use_proxy boolean | If If the value is not specified in the task, the value of environment variable The default is Choices:
|
use_ssl boolean | 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:
|
username string | The username to use for authentication. If the value is not specified in the task, the value of environment variables |
uuid aliases: set_rule_policy_uuid string | The UUID of the Set Rule Policy. This parameter is required when the |
validate_certs boolean | 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
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/cisco/mso/ndo_set_rule_policy_module.html