Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - hosts: Switches
- gather_facts: no
- connection: network_cli
- tasks:
- - name: save backup
- ios_config:
- username: "ansible"
- authorize: yes
- auth_pass: "ansiblepass"
- backup: yes
- register: config
- [Switches]
- Switch01 ansible_host=192.168.100.66
- [Switches:vars]
- ansible_become=yes
- ansible_become_method=enable
- ansible_network_os=ios
- ansible_user=ansible
- ansible_ssh_pass=ansiblepass
- ansible_authorize=yes
- ansible_auth_pass=authpass
- ansible-playbook 2.7.0
- config file = /etc/ansible/ansible.cfg
- configured module search path = [u'/home/acalero/.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.9 (default, Sep 25 2018, 20:42:16) [GCC 4.9.2]
- Using /etc/ansible/ansible.cfg as config file
- setting up inventory plugins
- Set default localhost to localhost
- Parsed /etc/ansible/hosts 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: switches_backup.yaml.old ****************************************************************************************************************************************************************************
- 1 plays in switches_backup.yaml.old
- PLAY [Switches] ********************************************************************************************************************************************************************************************
- META: ran handlers
- TASK [save backup] ********************************************************************************************************************************************************************************************
- task path: /home/acalero/ansible-playbooks/switches_backup/switches_backup.yaml.old:8
- <192.168.100.66> attempting to start connection
- <192.168.100.66> using connection plugin network_cli
- <192.168.100.66> local domain socket does not exist, starting it
- <192.168.100.66> control socket path is /home/acalero/.ansible/pc/d8fb3c670b
- <192.168.100.66> <192.168.100.66> ESTABLISH CONNECTION FOR USER: ansible on PORT 22 TO 192.168.100.66
- <192.168.100.66> <192.168.100.66> ssh connection done, setting terminal
- <192.168.100.66> <192.168.100.66> loaded terminal plugin for network_os ios
- <192.168.100.66> <192.168.100.66> loaded cliconf plugin for network_os ios
- <192.168.100.66> <192.168.100.66> firing event: on_open_shell()
- <192.168.100.66> <192.168.100.66> firing event: on_become
- <192.168.100.66> <192.168.100.66> ssh connection has completed successfully
- <192.168.100.66> connection to remote device started successfully
- <192.168.100.66> local domain socket listeners started successfully
- <192.168.100.66>
- <192.168.100.66> local domain socket path is /home/acalero/.ansible/pc/d8fb3c670b
- <192.168.100.66> ESTABLISH LOCAL CONNECTION FOR USER: acalero
- <192.168.100.66> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/acalero/.ansible/tmp/ansible-local-20795jNEN9Z/ansible-tmp-1551716732.29-125541186030584 `" && echo ansible-tmp-1551716732.29-125541186030584="` echo /home/acalero/.ansible/tmp/ansible-local-20795jNEN9Z/ansible-tmp-1551716732.29-125541186030584 `" ) && sleep 0'
- Using module file /usr/lib/python2.7/dist-packages/ansible/modules/network/ios/ios_config.py
- <192.168.100.66> PUT /home/acalero/.ansible/tmp/ansible-local-20795jNEN9Z/tmpGBmqu8 TO /home/acalero/.ansible/tmp/ansible-local-20795jNEN9Z/ansible-tmp-1551716732.29-125541186030584/AnsiballZ_ios_config.py
- <192.168.100.66> EXEC /bin/sh -c 'chmod u+x /home/acalero/.ansible/tmp/ansible-local-20795jNEN9Z/ansible-tmp-1551716732.29-125541186030584/ /home/acalero/.ansible/tmp/ansible-local-20795jNEN9Z/ansible-tmp-1551716732.29-125541186030584/AnsiballZ_ios_config.py && sleep 0'
- <192.168.100.66> EXEC /bin/sh -c '/usr/bin/python /home/acalero/.ansible/tmp/ansible-local-20795jNEN9Z/ansible-tmp-1551716732.29-125541186030584/AnsiballZ_ios_config.py && sleep 0'
- <192.168.100.66> EXEC /bin/sh -c 'rm -f -r /home/acalero/.ansible/tmp/ansible-local-20795jNEN9Z/ansible-tmp-1551716732.29-125541186030584/ > /dev/null 2>&1 && sleep 0'
- The full traceback is:
- WARNING: The below traceback may *not* be related to the actual failure.
- File "/tmp/ansible_ios_config_payload_o28p8l/ansible_ios_config_payload.zip/ansible/module_utils/network/ios/ios.py", line 114, in get_config
- out = connection.get_config(flags=flags)
- File "/tmp/ansible_ios_config_payload_o28p8l/ansible_ios_config_payload.zip/ansible/module_utils/connection.py", line 173, in __rpc__
- raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
- [DEPRECATION WARNING]: Param 'username' is deprecated. See the module docs for more information. This feature will be removed in version 2.9. Deprecation warnings can be disabled by setting
- deprecation_warnings=False in ansible.cfg.
- [DEPRECATION WARNING]: Param 'auth_pass' is deprecated. See the module docs for more information. This feature will be removed in version 2.9. Deprecation warnings can be disabled by setting
- deprecation_warnings=False in ansible.cfg.
- fatal: [Switch01]: FAILED! => {
- "changed": false,
- "invocation": {
- "module_args": {
- "after": null,
- "auth_pass": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
- "authorize": true,
- "backup": true,
- "before": null,
- "defaults": false,
- "diff_against": null,
- "diff_ignore_lines": null,
- "force": false,
- "host": null,
- "intended_config": null,
- "lines": null,
- "match": "line",
- "multiline_delimiter": "@",
- "parents": null,
- "password": null,
- "port": null,
- "provider": null,
- "replace": "line",
- "running_config": null,
- "save": false,
- "save_when": "never",
- "src": null,
- "ssh_keyfile": null,
- "timeout": null,
- "username": "ansible"
- }
- },
- "msg": "show running-configrn ^rn% Invalid input detected at '^' marker.rnrnSW01-01#"
- }
- to retry, use: --limit @/home/acalero/ansible-playbooks/switches_backup/switches_backup.yaml.retry
- PLAY RECAP ****************************************************************************************************************************************************************************************************
- SW01-01 : ok=0 changed=0 unreachable=0 failed=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement