This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: webserver | |
connection: local | |
tasks: | |
- shell: /bin/echo hello | |
- ping: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: webserver | |
connection: local | |
tasks: | |
- shell: /bin/echo hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: match sections | |
pattern_match: | |
regex: "^(\\S+) is up," | |
match_all: true | |
match_greedy: true | |
export: yes | |
register: section | |
- name: match interface values | |
pattern_group: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: match sections | |
pattern_match: | |
regex: "^(\\S+) is up," | |
match_all: true | |
match_greedy: true | |
register: section | |
- name: match interface values | |
pattern_group: | |
- name: match name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Parser for VRF output | |
parser_metadata: | |
version: 1.0 | |
command: show vrf | |
network_os: ios | |
- name: Match VRF output | |
pattern_match: | |
regex: "^\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s*(\\S*)$" | |
match_all: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TASK [nxos_system : debug] ***************************************************** | |
ok: [a43a2620-674e-491d-928b-25be8f6f8587] => { | |
"msg": "START connection=network_cli/sanity.yaml" | |
} | |
TASK [nxos_system : debug] ***************************************************** | |
skipping: [a43a2620-674e-491d-928b-25be8f6f8587] => {} | |
TASK [nxos_system : remove configuration] ************************************** | |
changed: [a43a2620-674e-491d-928b-25be8f6f8587] => {"changed": true, "commands": ["no hostname", "no ip name-server 10.0.2.3"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"stdout": [ | |
{ | |
"TABLE_snapshot": { | |
"ROW_snapshot": [ | |
{ | |
"file_name": "interface.xml", | |
"snap_name": "test_snapshot1" | |
}, | |
{ | |
"file_name": "route-summary.xml", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git show bdd77747506ca2ba3697fb80884e0826889a5819 | |
commit bdd77747506ca2ba3697fb80884e0826889a5819 (HEAD -> nxos_run_commands_check_rc_false) | |
Author: Trishna Guha <trishnaguha17@gmail.com> | |
Date: Thu May 24 16:31:51 2018 +0530 | |
fix nxos run_commands with check_rc being False | |
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> | |
diff --git a/lib/ansible/module_utils/network/nxos/nxos.py b/lib/ansible/module_utils/network/nxos/nxos.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TASK [nxos_install_os] ****************************************************************************************************************************************************** | |
task path: /home/tguha/RHWork/ansible/hacking/example/nxosinstall.yml:9 | |
<nxos3k> attempting to start connection | |
<nxos3k> using connection plugin network_cli | |
<nxos3k> local domain socket does not exist, starting it | |
<nxos3k> control socket path is /home/tguha/.ansible/pc/c5f1dec22f | |
<nxos3k> <nxos3k> ESTABLISH CONNECTION FOR USER: admin on PORT 22 TO nxos3k | |
<nxos3k> <nxos3k> ssh connection done, setting terminal | |
<nxos3k> <nxos3k> loaded terminal plugin for network_os nxos | |
<nxos3k> <nxos3k> loaded cliconf plugin for network_os nxos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ansible.cfg: | |
[defaults] | |
host_key_checking=false | |
inventory=inventory | |
[persistent_connection] | |
command_timeout=600 | |
connect_timeout=600 | |