Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- huawei.yml:
- - name: test
- hosts: test
- gather_facts: no
- tasks:
- - name: checking version
- ce_command:
- commands: display version
- register: version
- - name: debug
- debug:
- msg: version.stdout
- when: '"Huawei" in version.stdout_lines'
- $ ansible-playbook huawei.yml -i testhosts -vvvv
- ansible-playbook 2.8.6
- config file = /etc/ansible/ansible.cfg
- configured module search path = [u'/home/user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
- ansible python module location = /usr/lib/python2.7/dist-packages/ansible
- executable location = /usr/bin/ansible-playbook
- python version = 2.7.15+ (default, Oct 7 2019, 17:39:04) [GCC 7.4.0]
- Using /etc/ansible/ansible.cfg as config file
- setting up inventory plugins
- host_list declined parsing /home/user/git_root/ansible/testhosts as it did not pass it's verify_file() method
- script declined parsing /home/user/git_root/ansible/testhosts as it did not pass it's verify_file() method
- auto declined parsing /home/user/git_root/ansible/testhosts as it did not pass it's verify_file() method
- Parsed /home/user/git_root/ansible/testhosts inventory source with ini plugin
- Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/dist-packages/ansible/plugins/callback/default.pyc
- PLAYBOOK: huawei.yml *************************************************************************************************
- Positional arguments: huawei.yml
- become_method: sudo
- inventory: (u'/home/user/git_root/ansible/testhosts',)
- forks: 5
- tags: (u'all',)
- verbosity: 4
- connection: smart
- timeout: 10
- 1 plays in huawei.yml
- PLAY [Run show commands on routers] **********************************************************************************
- META: ran handlers
- TASK [checking version] **********************************************************************************************
- task path: /home/user/git_root/ansible/huawei.yml:27
- <10.0.0.1> attempting to start connection
- <10.0.0.1> using connection plugin network_cli
- <10.0.0.1> local domain socket does not exist, starting it
- <10.0.0.1> control socket path is /home/user/.ansible/pc/3d86766b90
- <10.0.0.1> <10.0.0.1> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: user on PORT 22 TO 10.0.0.1
- <10.0.0.1> connection to remote device started successfully
- <10.0.0.1> local domain socket listeners started successfully
- <10.0.0.1> loaded cliconf plugin for network_os ce
- <10.0.0.1> ssh connection done, setting terminal
- <10.0.0.1> loaded terminal plugin for network_os ce
- <10.0.0.1> Response received, triggered 'persistent_buffer_read_timeout' timer of 0.1 seconds
- <10.0.0.1> firing event: on_open_shell()
- <10.0.0.1> Response received, triggered 'persistent_buffer_read_timeout' timer of 0.1 seconds
- <10.0.0.1> ssh connection has completed successfully
- <10.0.0.1>
- <10.0.0.1> local domain socket path is /home/user/.ansible/pc/3d86766b90
- <10.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: user
- <10.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/user/.ansible/tmp/ansible-local-273775BiaX3/ansible-tmp-1572443165.56-28530366068558 `" && echo ansible-tmp-1572443165.56-28530366068558="` echo /home/user/.ansible/tmp/ansible-local-273775BiaX3/ansible-tmp-1572443165.56-28530366068558 `" ) && sleep 0'
- <10.0.0.1> Attempting python interpreter discovery
- <10.0.0.1> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python3.7'"'"'; command -v '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v '"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; command -v '"'"'/usr/libexec/platform-python'"'"'; command -v '"'"'/usr/bin/python3'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && sleep 0'
- <10.0.0.1> EXEC /bin/sh -c '/usr/bin/python && sleep 0'
- Using module file /usr/lib/python2.7/dist-packages/ansible/modules/network/cloudengine/ce_command.py
- <10.0.0.1> PUT /home/user/.ansible/tmp/ansible-local-273775BiaX3/tmp5wPg0i TO /home/user/.ansible/tmp/ansible-local-273775BiaX3/ansible-tmp-1572443165.56-28530366068558/AnsiballZ_ce_command.py
- <10.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/user/.ansible/tmp/ansible-local-273775BiaX3/ansible-tmp-1572443165.56-28530366068558/ /home/user/.ansible/tmp/ansible-local-273775BiaX3/ansible-tmp-1572443165.56-28530366068558/AnsiballZ_ce_command.py && sleep 0'
- <10.0.0.1> EXEC /bin/sh -c '/usr/bin/python /home/user/.ansible/tmp/ansible-local-273775BiaX3/ansible-tmp-1572443165.56-28530366068558/AnsiballZ_ce_command.py && sleep 0'
- <10.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/user/.ansible/tmp/ansible-local-273775BiaX3/ansible-tmp-1572443165.56-28530366068558/ > /dev/null 2>&1 && sleep 0'
- ok: [10.0.0.1] => {
- "ansible_facts": {
- "discovered_interpreter_python": "/usr/bin/python"
- },
- "changed": false,
- "invocation": {
- "module_args": {
- "commands": [
- "display version"
- ],
- "host": null,
- "interval": 1,
- "match": "all",
- "password": null,
- "port": null,
- "provider": null,
- "retries": 10,
- "ssh_keyfile": null,
- "timeout": null,
- "transport": null,
- "use_ssl": null,
- "username": null,
- "validate_certs": null,
- "wait_for": null
- }
- },
- "stdout": [
- "Huawei Versatile Routing Platform Software\nVRP (R) software, Version 5.150 (AR1200 V200R005C10)\nCopyright (C) 2011-2013 HUAWEI TECH CO., LTD\nHuawei AR1220V Router uptime is 3 weeks, 3 days, 4 hours, 42 minutes\n\nMPU 0(Master) : uptime is 3 weeks, 3 days, 4 hours, 42 minutes\nSDRAM Memory Size : 512 M bytes\nFlash Memory Size : 256 M bytes\nNVRAM Memory Size : 512 K bytes\nMPU version information : \n1. PCB Version : AR01SRU1B VER.C\n2. MAB Version : 0\n3. Board Type : AR1220V\n4. CPLD0 Version : 104\n5. BootROM Version : 753\n\nLPU 1 : uptime is 3 weeks, 3 days, 4 hours, 41 minutes\nSDRAM Memory Size : 256 M bytes\nFlash Memory Size : 16 M bytes\nLPU version information : \n1. PCB Version : AR01SVA4B1A VER.C\n2. MAB Version : 0\n3. Board Type : 4FXS1FXO\n4. BootROM Version : 516\n5. BootLoad Version : 626"
- ],
- "stdout_lines": [
- [
- "Huawei Versatile Routing Platform Software",
- "VRP (R) software, Version 5.150 (AR1200 V200R005C10)",
- "Copyright (C) 2011-2013 HUAWEI TECH CO., LTD",
- "Huawei AR1220V Router uptime is 3 weeks, 3 days, 4 hours, 42 minutes",
- "",
- "MPU 0(Master) : uptime is 3 weeks, 3 days, 4 hours, 42 minutes",
- "SDRAM Memory Size : 512 M bytes",
- "Flash Memory Size : 256 M bytes",
- "NVRAM Memory Size : 512 K bytes",
- "MPU version information : ",
- "1. PCB Version : AR01SRU1B VER.C",
- "2. MAB Version : 0",
- "3. Board Type : AR1220V",
- "4. CPLD0 Version : 104",
- "5. BootROM Version : 753",
- "",
- "LPU 1 : uptime is 3 weeks, 3 days, 4 hours, 41 minutes",
- "SDRAM Memory Size : 256 M bytes",
- "Flash Memory Size : 16 M bytes",
- "LPU version information : ",
- "1. PCB Version : AR01SVA4B1A VER.C",
- "2. MAB Version : 0",
- "3. Board Type : 4FXS1FXO",
- "4. BootROM Version : 516",
- "5. BootLoad Version : 626"
- ]
- ]
- }
- TASK [debug] *********************************************************************************************************
- task path: /home/user/git_root/ansible/huawei.yml:54
- skipping: [10.0.0.1] => {}
- META: ran handlers
- META: ran handlers
- PLAY RECAP ***********************************************************************************************************
- 10.0.0.1 : ok=1 changed=0 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement