NSO・NEDとAnsible/Terraform5 / 7
AnsibleでIOS XRのoperational commandを送る
入力するplaybook taskの例:
- name: Get interface status
cisco.iosxr.iosxr_command:
commands:
- show interfaces brief
register: interfaces
戻り値の表示例の抜粋:
stdout:
- |
Interface Intf State LineP State
Lo0 up up
interfaces.stdout[0]に、最初のコマンドの出力が入る。この表示例ではLo0のinterfaceとline protocolがともにupである。