Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nicholas $
- nicholas $ ansible-playbook playbook.yml -i inventory.txt
- PLAY [Network Getting Started First Playbook] **************************************************************************************
- TASK [Get config for Ubuntu devices] ***********************************************************************************************
- An exception occurred during task execution. To see the full traceback, use -vvv. The error was: See the timeout setting options in the Network Debug and Troubleshooting Guide.
- fatal: [127.0.0.1]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""}
- PLAY RECAP *************************************************************************************************************************
- 127.0.0.1 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
- nicholas $
- nicholas $ cat playbook.yml
- ---
- - name: Network Getting Started First Playbook
- connection: network_cli
- gather_facts: false
- hosts: all
- tasks:
- - name: Get config for Ubuntu devices
- vyos_facts:
- gather_subset: all
- - name: Display the config
- debug:
- msg: "The hostname is {{ ansible_net_hostname }} and the OS is {{ ansible_net_version }}"
- nicholas $
- nicholas $ cat inventory.txt
- 127.0.0.1 ansible_connection=local
- nicholas $
- nicholas $ ansible-playbook -vvv playbook.yml -i inventory.txt
- ansible-playbook 2.9.6
- config file = /home/nicholas/ansible/ansible.cfg
- configured module search path = ['/home/nicholas/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
- ansible python module location = /usr/lib/python3/dist-packages/ansible
- executable location = /usr/bin/ansible-playbook
- python version = 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0]
- Using /home/nicholas/ansible/ansible.cfg as config file
- host_list declined parsing /home/nicholas/ansible/inventory.txt as it did not pass its verify_file() method
- script declined parsing /home/nicholas/ansible/inventory.txt as it did not pass its verify_file() method
- auto declined parsing /home/nicholas/ansible/inventory.txt as it did not pass its verify_file() method
- yaml declined parsing /home/nicholas/ansible/inventory.txt as it did not pass its verify_file() method
- Parsed /home/nicholas/ansible/inventory.txt inventory source with ini plugin
- PLAYBOOK: playbook.yml *************************************************************************************************************
- 1 plays in playbook.yml
- PLAY [Network Getting Started First Playbook] **************************************************************************************
- META: ran handlers
- TASK [Get config for Ubuntu devices] ***********************************************************************************************
- task path: /home/nicholas/ansible/playbook.yml:9
- <127.0.0.1> using connection plugin network_cli (was local)
- The full traceback is:
- Traceback (most recent call last):
- File "/usr/lib/python3/dist-packages/ansible/executor/task_executor.py", line 146, in run
- res = self._execute()
- File "/usr/lib/python3/dist-packages/ansible/executor/task_executor.py", line 645, in _execute
- result = self._handler.run(task_vars=variables)
- File "/usr/lib/python3/dist-packages/ansible/plugins/action/vyos.py", line 85, in run
- out = conn.get_prompt()
- File "/usr/lib/python3/dist-packages/ansible/module_utils/connection.py", line 185, in __rpc__
- raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
- ansible.module_utils.connection.ConnectionError: command timeout triggered, timeout value is 10 secs.
- See the timeout setting options in the Network Debug and Troubleshooting Guide.
- fatal: [127.0.0.1]: FAILED! => {
- "msg": "Unexpected failure during module execution.",
- "stdout": ""
- }
- PLAY RECAP *************************************************************************************************************************
- 127.0.0.1 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
- nicholas $
- nicholas $ lsb_release -a
- No LSB modules are available.
- Distributor ID: Ubuntu
- Description: Ubuntu 20.04 LTS
- Release: 20.04
- Codename: focal
- nicholas $
- nicholas $ ls
- ansible.cfg ansible.cfg.orig first_playbook.yml inventory.txt playbook.yml
- nicholas $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement