diff --git a/geant/gap_ansible/meta/runtime.yml b/geant/gap_ansible/meta/runtime.yml index 2fe301c6b297df526fdaff54e491ab728887fca6..f3589f4f1d044afaeeac62c9706e0540005ab1ab 100644 --- a/geant/gap_ansible/meta/runtime.yml +++ b/geant/gap_ansible/meta/runtime.yml @@ -1,7 +1,7 @@ --- # Collections must specify a minimum required ansible version to upload # to galaxy -requires_ansible: '>=2.9.10' +requires_ansible: '>=2.15.0' # Content that Ansible needs to load from another location or that has # been deprecated/removed diff --git a/geant/gap_ansible/playbooks/base_config_checks.yaml b/geant/gap_ansible/playbooks/base_config_checks.yaml index 5f447d880a5ecc5881fe331fd2cc1c2d039d1dd8..493e0547f16f289b0dbe5c69c7533f26a0bf1df8 100644 --- a/geant/gap_ansible/playbooks/base_config_checks.yaml +++ b/geant/gap_ansible/playbooks/base_config_checks.yaml @@ -4,4 +4,4 @@ gather_facts: false remote_user: admin roles: - - ../roles/base_config_checks \ No newline at end of file + - ../roles/base_config_checks diff --git a/geant/gap_ansible/roles/base_config_checks/tasks/base_config_single_command.yaml b/geant/gap_ansible/roles/base_config_checks/tasks/base_config_single_command.yaml index 8552009d002192a2373a493cc2e08245d844e382..0e713647cef046df02e65dded348bfccfc87dc31 100644 --- a/geant/gap_ansible/roles/base_config_checks/tasks/base_config_single_command.yaml +++ b/geant/gap_ansible/roles/base_config_checks/tasks/base_config_single_command.yaml @@ -1,10 +1,10 @@ -- name: "Execute {{item.command}}" +- name: "Execute {{ item.command }}" ansible.netcommon.netconf_rpc: rpc: action xmlns: "urn:ietf:params:xml:ns:yang:1" content: "{{ lookup('ansible.builtin.template', './base_config_single_command.j2') }}" display: json register: out -- name: "Results of {{item.command}}" - debug: +- name: "Results of {{ item.command }}" + ansible.builtin.debug: msg: "{{out.output['rpc-reply']['nokiaoper:results']['nokiaoper:md-cli-output-block'].split('\n')}}" diff --git a/geant/gap_ansible/roles/base_config_checks/tasks/main.yml b/geant/gap_ansible/roles/base_config_checks/tasks/main.yml index 122da68ee19129234ba737753471611e1687fef6..c72cfdf9a378ab056e20102f212af211cd49aeae 100644 --- a/geant/gap_ansible/roles/base_config_checks/tasks/main.yml +++ b/geant/gap_ansible/roles/base_config_checks/tasks/main.yml @@ -1,5 +1,5 @@ --- -# tasks file for base_config_checks + - name: Execute post-check command - include_tasks: base_config_single_command.yaml - with_items: "{{commands}}" + ansible.builtin.include_tasks: base_config_single_command.yaml + with_items: "{{ commands }}" diff --git a/geant/gap_ansible/roles/base_config_checks/vars/main.yml b/geant/gap_ansible/roles/base_config_checks/vars/main.yml index 335e8e41dad710e43c7abd97fd113fa9be7381b7..732cf342cdec79efa8c6b6dc128ae345113c4935 100644 --- a/geant/gap_ansible/roles/base_config_checks/vars/main.yml +++ b/geant/gap_ansible/roles/base_config_checks/vars/main.yml @@ -1,17 +1,17 @@ --- # vars file for base_config_checks commands: -- command: show version - description: "Shows the version of SROS" -- command: show chassis - description: "Shows the status of the chassis" -- command: show card - description: "Shows the status of the cards" -- command: show port - description: "Shows the status of the ports" -- command: show mda - description: "Shows the status of the mdas" -- command: show sfm - description: "Shows the status of Switching Fabric Modules" -- command: show redundancy synchronization - description: "Shows the status of the syncronization" + - command: show version + description: "Shows the version of SROS" + - command: show chassis + description: "Shows the status of the chassis" + - command: show card + description: "Shows the status of the cards" + - command: show port + description: "Shows the status of the ports" + - command: show mda + description: "Shows the status of the mdas" + - command: show sfm + description: "Shows the status of Switching Fabric Modules" + - command: show redundancy synchronization + description: "Shows the status of the syncronization"