cisco / cisco.nd / 0.5.0 / module / nd_pcv_delta_analysis Query delta analysis of pre-change validation | "added in version" 0.2.0 of cisco.nd" Authors: Cindy Zhao (@cizhao) preview | supported by communitycisco.nd.nd_pcv_delta_analysis (0.5.0) — module
Install with ansible-galaxy collection install cisco.nd:==0.5.0
collections: - name: cisco.nd version: 0.5.0
Query delta analysis of pre-change validation on Cisco Nexus Dashboard Insights (NDI).
- name: Query prechange validation delta analysis result cisco.nd.nd_pcv_delta_analysis: insights_group: exampleIG site_name: exampleSite name: exampleName
- name: Query and Validate Pre-Change Analysis results cisco.nd.nd_pcv_delta_analysis: insights_group: exampleIG site_name: exampleSite name: exampleName state: validate exclude_ack_anomalies: yes epoch_choice: epoch2 register: pcv_result
- name: Custom validation of Pre-Change Analysis results ansible.builtin.assert: that: - pcv_result.current.anomaly_count.critical.epoch2_only == 0 - pcv_result.current.anomaly_count.major.epoch2_only == 0 - pcv_result.current.anomaly_count.minor.epoch2_only == 0 - pcv_result.current.anomaly_count.warning.epoch2_only == 0 success_msg: "Pre-change Analysis successful, no new anomalies found" fail_msg: "Pre-change Analysis failed, new anomalies have been found"
host: aliases: - hostname description: - IP Address or hostname of the Nexus Dashboard (ND) host. - If the value is not specified in the task, the value of environment variable C(ND_HOST) will be used instead. type: str name: description: - The name of the pre-change validation. required: true type: str port: description: - 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 C(ND_PORT) will be used instead. type: int state: choices: - query - validate default: query description: - Use C(query) for existing pre-change analysis result. - Use C(validate) to execute the query until pre-change verification task status value is COMPLETED - Use C(validate) to return an error if any unacknowledged anomalies exist type: str timeout: default: 30 description: - The socket level timeout in seconds. - If the value is not specified in the task, the value of environment variable C(ND_TIMEOUT) will be used instead. type: int use_ssl: description: - If C(no), an HTTP connection will be used instead of the default HTTPS connection. - If the value is not specified in the task, the value of environment variable C(ND_USE_SSL) will be used instead. type: bool password: description: - The password to use for authentication. - If the value is not specified in the task, the value of environment variables C(ND_PASSWORD) or C(ANSIBLE_NET_PASSWORD) will be used instead. type: str username: description: - The username to use for authentication. - If the value is not specified in the task, the value of environment variables C(ND_USERNAME) or C(ANSIBLE_NET_USERNAME) will be used instead. type: str site_name: aliases: - site description: - Name of the Assurance Entity. required: true type: str use_proxy: description: - If C(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts. - If the value is not specified in the task, the value of environment variable C(ND_USE_PROXY) will be used instead. type: bool epoch_choice: choices: - epoch2 - epoch1 - both_epoch - all default: epoch2 description: - Choice of which Epoch to report when querying for anomalies. - Use epoch2 to choose anomalies present only in epoch2. - Use epoch1 to choose anomalies present only in epoch1. - Use both_epoch to choose anomalies common for both epoch1 and epoch2. type: str login_domain: description: - The login domain name to use for authentication. - The default value is DefaultAuth. - If the value is not specified in the task, the value of environment variable C(ND_LOGIN_DOMAIN) will be used instead. type: str output_level: choices: - debug - info - normal default: normal description: - Influence the output of this ND module. - C(normal) means the standard output, incl. C(current) dict - C(info) adds informational output, incl. C(previous), C(proposed) and C(sent) dicts - C(debug) adds debugging output, incl. C(filter_string), C(method), C(response), C(status) and C(url) information - If the value is not specified in the task, the value of environment variable C(ND_OUTPUT_LEVEL) will be used instead. type: str insights_group: aliases: - fab_name - ig_name description: - The name of the insights group. required: true type: str validate_certs: description: - If C(no), SSL certificates will not be validated. - This should only set to C(no) when used on personally controlled sites using self-signed certificates. - If the value is not specified in the task, the value of environment variable C(ND_VALIDATE_CERTS) will be used instead. type: bool exclude_ack_anomalies: default: false description: - Option to exclude anomalies which is acknowledged type: bool