R12.1-JA-2025June05

NI Remediation with Ansible Node

Ansible node can be integrated with NI remediation to enable Ansible-based network changes.

  • Device: You can specify the target device for the Ansible node but cannot specify which host group it belongs to.
  • Playbook preview: After you select the Ansible node in the left pane, the system retrieves the playbook defined in this node and displays it on the right for users to review.
  • Set Host Variables: If input variables are defined in the node's inventory template, they will be displayed, enabling you to assign values using NI variables. Note that expressions are not supported here.
    Only host variables are supported; extra variables, global variables, and group variables in the Ansible node are not supported. The rules for inserting variables here align with those used for defining variables in diagnosis messages.
    if no input variables are defined, the UI is as follows:

Instantiate Ansible Node

When generating a CM task instance via NI remediation, the main process for instantiating the Ansible node is as follows:

Step 1: Define the CM Template

  1. Define a Change Task and use Ansible node to do network change.
  2. Declare input variables in the inventory template of the Ansible node, e.g., $input_var.intf, $input_var.ip.
  3. Save the Change Task as change management template.

Step 2: Define NI Remediation

  1. Create a Network Intent, call Remediation Action in the NI diagnosis. 
  2. The NI editor reads input variables from the Ansible node of the selected CM template and prompts the users to use NI variables to assign values to these input variables (with auto-generated input boxes in NI remediation).
  3. The NI Editor reads the playbook in Ansible and displays it to users in read-only mode, simply to inform them how the host variables are used in the playbook.

Step 3: NI Generates CM Task During NI Post-execution

  1. Users run the network intent, the intent diagnosis will create a remediation output during the intent execution.
  2. NI generates the 'external input vars' in YAML, appending it to the inventory template of the Ansible node in the CM task to be generated (if this YAML already exists, it will be overwritten).
  3. The 'Translate Inventory' calculation is triggered, generating the inventory instance.