Advertisement
nsaunders

Untitled

Sep 15th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.33 KB | None | 0 0
  1. nicholas $
  2. nicholas $ ansible-playbook playbook.yml -i inventory.txt
  3.  
  4. PLAY [Network Getting Started First Playbook] **************************************************************************************
  5.  
  6. TASK [Get config for Ubuntu devices] ***********************************************************************************************
  7. 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.
  8. fatal: [127.0.0.1]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""}
  9.  
  10. PLAY RECAP *************************************************************************************************************************
  11. 127.0.0.1 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
  12.  
  13. nicholas $
  14. nicholas $ cat playbook.yml
  15. ---
  16.  
  17. - name: Network Getting Started First Playbook
  18. connection: network_cli
  19. gather_facts: false
  20. hosts: all
  21. tasks:
  22.  
  23. - name: Get config for Ubuntu devices
  24. vyos_facts:
  25. gather_subset: all
  26.  
  27. - name: Display the config
  28. debug:
  29. msg: "The hostname is {{ ansible_net_hostname }} and the OS is {{ ansible_net_version }}"
  30.  
  31. nicholas $
  32. nicholas $ cat inventory.txt
  33.  
  34. 127.0.0.1 ansible_connection=local
  35.  
  36.  
  37. nicholas $
  38. nicholas $ ansible-playbook -vvv playbook.yml -i inventory.txt
  39. ansible-playbook 2.9.6
  40. config file = /home/nicholas/ansible/ansible.cfg
  41. configured module search path = ['/home/nicholas/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  42. ansible python module location = /usr/lib/python3/dist-packages/ansible
  43. executable location = /usr/bin/ansible-playbook
  44. python version = 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0]
  45. Using /home/nicholas/ansible/ansible.cfg as config file
  46. host_list declined parsing /home/nicholas/ansible/inventory.txt as it did not pass its verify_file() method
  47. script declined parsing /home/nicholas/ansible/inventory.txt as it did not pass its verify_file() method
  48. auto declined parsing /home/nicholas/ansible/inventory.txt as it did not pass its verify_file() method
  49. yaml declined parsing /home/nicholas/ansible/inventory.txt as it did not pass its verify_file() method
  50. Parsed /home/nicholas/ansible/inventory.txt inventory source with ini plugin
  51.  
  52. PLAYBOOK: playbook.yml *************************************************************************************************************
  53. 1 plays in playbook.yml
  54.  
  55. PLAY [Network Getting Started First Playbook] **************************************************************************************
  56. META: ran handlers
  57.  
  58. TASK [Get config for Ubuntu devices] ***********************************************************************************************
  59. task path: /home/nicholas/ansible/playbook.yml:9
  60. <127.0.0.1> using connection plugin network_cli (was local)
  61. The full traceback is:
  62. Traceback (most recent call last):
  63. File "/usr/lib/python3/dist-packages/ansible/executor/task_executor.py", line 146, in run
  64. res = self._execute()
  65. File "/usr/lib/python3/dist-packages/ansible/executor/task_executor.py", line 645, in _execute
  66. result = self._handler.run(task_vars=variables)
  67. File "/usr/lib/python3/dist-packages/ansible/plugins/action/vyos.py", line 85, in run
  68. out = conn.get_prompt()
  69. File "/usr/lib/python3/dist-packages/ansible/module_utils/connection.py", line 185, in __rpc__
  70. raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
  71. ansible.module_utils.connection.ConnectionError: command timeout triggered, timeout value is 10 secs.
  72. See the timeout setting options in the Network Debug and Troubleshooting Guide.
  73. fatal: [127.0.0.1]: FAILED! => {
  74. "msg": "Unexpected failure during module execution.",
  75. "stdout": ""
  76. }
  77.  
  78. PLAY RECAP *************************************************************************************************************************
  79. 127.0.0.1 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
  80.  
  81. nicholas $
  82. nicholas $ lsb_release -a
  83. No LSB modules are available.
  84. Distributor ID: Ubuntu
  85. Description: Ubuntu 20.04 LTS
  86. Release: 20.04
  87. Codename: focal
  88. nicholas $
  89. nicholas $ ls
  90. ansible.cfg ansible.cfg.orig first_playbook.yml inventory.txt playbook.yml
  91. nicholas $
  92.  
  93.  
  94.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement