You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---
- name: vyos setupconnection: network_cligather_facts: falsehosts: os.vyosvars:
ansible_network_os: vyostasks:
- name: Get config for VyOS devicesvyos.vyos.vyos_facts:
gather_subset: all# gather_network_resources: all
- name: Display the configdebug:
msg: The hostname is {{ ansible_net_hostname }} and the OS is {{ ansible_net_version }}
EXPECTED RESULTS
msg: "The hostname is vyos and the OS is VyOS 1.3-rolling-202007130117"
ACTUAL RESULTS
What the result i got in the debug print was:
ok: [router] =>
msg: "The hostname is vyos\e[m and the OS is VyOS 1.3-rolling-202007130117\e[m"
ansible-playbook 2.9.10
config file = /home/foobar/git/devops/ansible/vagrant/ansible.cfg
configured module search path = ['/home/foobar/git/devops/lib/ansible/modules']
ansible python module location = /home/foobar/ansible/lib/python3.7/site-packages/ansible
executable location = /home/foobar/bin/ansible-playbook
python version = 3.7.3 (default, Dec 20 2019, 18:57:59) [GCC 8.3.0]
Using /home/foobar/git/devops/ansible/vagrant/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /home/foobar/git/devops/ansible/vagrant/inventory as it did not pass its verify_file() method
script declined parsing /home/foobar/git/devops/ansible/vagrant/inventory as it did not pass its verify_file() method
auto declined parsing /home/foobar/git/devops/ansible/vagrant/inventory as it did not pass its verify_file() method
Parsed /home/foobar/git/devops/ansible/vagrant/inventory inventory source with ini plugin
Loading callback plugin yaml of type stdout, v2.0 from /home/foobar/ansible/lib/python3.7/site-packages/ansible/plugins/callback/yaml.py
PLAYBOOK: vyos.yml *******************************************************************************************************************
Positional arguments: playbooks/boxes/vyos.yml
verbosity: 4
connection: smart
timeout: 10
force_handlers: True
become_method: sudo
tags: ('all',)
check: True
diff: True
inventory: ('/home/foobar/git/devops/ansible/vagrant/inventory',)
forks: 5
1 plays in playbooks/boxes/vyos.yml
PLAY [Network Getting Started First Playbook] ****************************************************************************************
META: ran handlers
TASK [Get config for VyOS devices] ***************************************************************************************************
task path: /home/foobar/git/devops/ansible/vagrant/playbooks/boxes/vyos.yml:10
<router.test> attempting to start connection
<router.test> using connection plugin network_cli
<router.test> local domain socket does not exist, starting it
<router.test> control socket path is /home/foobar/.ansible/pc/98284ff3ed
<router.test> local domain socket listeners started successfully
<router.test> loaded cliconf plugin vyos from path /home/foobar/ansible/lib/python3.7/site-packages/ansible/plugins/cliconf/vyos.py for network_os vyos
<router.test>
<router.test> local domain socket path is /home/foobar/.ansible/pc/98284ff3ed
<router> Attempting python interpreter discovery
<router.test> ESTABLISH LOCAL CONNECTION FOR USER: foobar
<router.test> 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'
<router.test> EXEC /bin/sh -c '/usr/bin/python && sleep 0'
<router> Python interpreter discovery fallback (unsupported Linux distribution: LinuxMint)
Using module file /home/foobar/.ansible/collections/ansible_collections/vyos/vyos/plugins/modules/vyos_facts.py
Pipelining is enabled.
<router.test> EXEC /bin/sh -c '/usr/bin/python && sleep 0'
[WARNING]: Platform linux on host router is using the discovered Python interpreter at /usr/bin/python, but future installation of
another Python interpreter could change this. See
https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information.
ok: [router] => changed=false
ansible_facts:
ansible_net_api: cliconf
ansible_net_commits:
- by: vagrant
comment: null
datetime: '2020-07-13 11:38:45 '
revision: '0'
via: "cli\e[m"
- by: vagrant
comment: null
datetime: '2020-07-13 11:36:01 '
revision: '1'
via: "cli\e[m"
- by: vagrant
comment: null
datetime: '2020-07-13 11:34:33 '
revision: '2'
via: "cli\e[m"
- by: root
comment: null
datetime: '2020-07-13 11:29:15 '
revision: '3'
via: "vyos-boot-config-loader\e[m"
- by: vagrant
comment: null
datetime: '2020-07-13 09:28:36 '
revision: '4'
via: "cli\e[m"
- by: vagrant
comment: null
datetime: '2020-07-13 09:28:31 '
revision: '5'
via: "cli\e[m"
- by: vagrant
comment: "configured by vyos_config\e[m"
datetime: '2020-07-13 09:28:27 '
revision: '6'
via: "cli\e[m"
- by: root
comment: null
datetime: '2020-07-13 09:28:05 '
revision: '7'
via: "boot-config-loader\e[m"
- by: vagrant
comment: null
datetime: '2020-02-05 10:32:27 '
revision: '8'
via: "cli\e[m"
- by: vagrant
comment: null
datetime: '2020-02-05 10:29:56 '
revision: '9'
via: "cli\e[m"
- by: vagrant
comment: null
datetime: '2020-02-05 09:46:05 '
revision: '10'
via: "cli\e[m"
- by: vagrant
comment: null
datetime: '2020-02-05 09:27:10 '
revision: '11'
via: "cli\e[m"
- by: vagrant
comment: null
datetime: '2020-02-05 09:25:30 '
revision: '12'
via: "cli\e[m"
- by: vyos
comment: null
datetime: '2020-02-05 09:14:16 '
revision: '13'
via: "cli\e[m"
- by: vyos
comment: null
datetime: '2020-02-05 09:10:29 '
revision: '14'
via: "cli\e[m"
- by: vyos
comment: null
datetime: '2020-02-05 09:10:19 '
revision: '15'
via: "cli\e[m"
- by: root
comment: null
datetime: '2020-02-05 09:09:06 '
revision: '16'
via: "boot-config-loader\e[m"
ansible_net_config:
- |-
set interfaces ethernet eth0 address 'dhcp'[m
set interfaces ethernet eth0 hw-id '08:00:27:cf:54:d5'[m
set interfaces ethernet eth1 hw-id '08:00:27:7b:6e:55'[m
set interfaces ethernet eth2 hw-id '08:00:27:8a:84:fe'[m
set interfaces ethernet eth3 hw-id '08:00:27:65:b6:67'[m
set interfaces ethernet eth4 hw-id '08:00:27:12:a0:e9'[m
set interfaces ethernet eth5 hw-id '08:00:27:08:86:3b'[m
set interfaces loopback lo[m
set service ssh disable-host-validation[m
set service ssh port '22'[m
set system config-management commit-revisions '20'[m
set system console device ttyS0 speed '115200'[m
set system host-name 'vyos'[m
set system login user vagrant authentication encrypted-password '$6$y8n2l.nAL6byU$.ESxKj7K4wwm.lpf46ckUY0AI.lkezzfJLiS/4ud4Mo.ukhxzWKRQZxjyAUih2E/ZXX7EFxNf1cblgWviI8wb/'[m
set system login user vagrant authentication plaintext-password ''[m
set system login user vagrant authentication public-keys vagrant key 'AAAAB3NzaC1yc2EAAAADAQABAAABAQC9cQTmeYT58NGlQAF3LKmEdjvweumyvepakR8A30ohd8m5N0aRvaEWNXpdg0nLLWQI+2YY9IqVd6Ipl6K64pQZVDNUAxNGphQsz4xlQzPsSh0lG572poPdeTvN2rkhL8EL4HcFrCZhYRL5jpWKQ5u6zahdK25qs9L+QeGDI7VGENjXARvLD0z6u2/NlPhdszD0CBIcKRZc+18GiBkoHOTJAj9ChzrMV71vbfXHqrb1AlrUdJ0IUrNnOLkGKWuNkHXD5qfh6phdc+fNtVdbxjkcuKkxoNDSQw8YdQqZGNt0HTpIoBauoWkDC78Ipd3lurK7wTs6l79rca0x5ZUyX3jT'[m
set system login user vagrant authentication public-keys vagrant type 'ssh-rsa'[m
set system name-servers-dhcp 'eth0'[m
set system ntp server 0.pool.ntp.org[m
set system ntp server 1.pool.ntp.org[m
set system ntp server 2.pool.ntp.org[m
set system syslog global facility all level 'info'[m
set system syslog global facility protocols level 'debug'[m
- |-
0 2020-07-13 11:38:45 by vagrant via cli[m
1 2020-07-13 11:36:01 by vagrant via cli[m
2 2020-07-13 11:34:33 by vagrant via cli[m
3 2020-07-13 11:29:15 by root via vyos-boot-config-loader[m
4 2020-07-13 09:28:36 by vagrant via cli[m
5 2020-07-13 09:28:31 by vagrant via cli[m
6 2020-07-13 09:28:27 by vagrant via cli[m
configured by vyos_config[m
7 2020-07-13 09:28:05 by root via boot-config-loader[m
8 2020-02-05 10:32:27 by vagrant via cli[m
9 2020-02-05 10:29:56 by vagrant via cli[m
10 2020-02-05 09:46:05 by vagrant via cli[m
11 2020-02-05 09:27:10 by vagrant via cli[m
12 2020-02-05 09:25:30 by vagrant via cli[m
13 2020-02-05 09:14:16 by vyos via cli[m
14 2020-02-05 09:10:29 by vyos via cli[m
15 2020-02-05 09:10:19 by vyos via cli[m
16 2020-02-05 09:09:06 by root via boot-config-loader[m
17 2020-02-05 09:09:05 by root via init[m
ansible_net_gather_network_resources: []
ansible_net_gather_subset:
- neighbors
- default
- config
ansible_net_hostname: "vyos\e[m"
ansible_net_neighbors: {}
ansible_net_python_version: 2.7.16
ansible_net_serialnum: null
ansible_net_system: vyos
ansible_net_version: "VyOS 1.3-rolling-202007130117\e[m"
ansible_network_resources: {}
discovered_interpreter_python: /usr/bin/python
invocation:
module_args:
gather_network_resources: null
gather_subset:
- all
provider: null
TASK [Display the config] ************************************************************************************************************
task path: /home/foobar/git/devops/ansible/vagrant/playbooks/boxes/vyos.yml:15
<router.test> attempting to start connection
<router.test> using connection plugin network_cli
<router.test> found existing local domain socket, using it!
<router.test> ssh connection done, setting terminal
<router.test> loaded terminal plugin for network_os vyos
<router.test> Response received, triggered 'persistent_buffer_read_timeout' timer of 0.1 seconds
<router.test> firing event: on_open_shell()
<router.test> Response received, triggered 'persistent_buffer_read_timeout' timer of 0.1 seconds
<router.test> Response received, triggered 'persistent_buffer_read_timeout' timer of 0.1 seconds
<router.test> Response received, triggered 'persistent_buffer_read_timeout' timer of 0.1 seconds
<router.test> ssh connection has completed successfully
<router.test> Response received, triggered 'persistent_buffer_read_timeout' timer of 0.1 seconds
<router.test> Response received, triggered 'persistent_buffer_read_timeout' timer of 0.1 seconds
<router.test> Response received, triggered 'persistent_buffer_read_timeout' timer of 0.1 seconds
<router.test> Response received, triggered 'persistent_buffer_read_timeout' timer of 0.1 seconds
<router.test> Response received, triggered 'persistent_buffer_read_timeout' timer of 0.1 seconds
<router.test> Response received, triggered 'persistent_buffer_read_timeout' timer of 0.1 seconds
<router.test> Response received, triggered 'persistent_buffer_read_timeout' timer of 0.1 seconds
<router.test> Response received, triggered 'persistent_buffer_read_timeout' timer of 0.1 seconds
<router.test> Response received, triggered 'persistent_buffer_read_timeout' timer of 0.1 seconds
<router.test> updating play_context for connection
<router.test>
<router.test> local domain socket path is /home/foobar/.ansible/pc/98284ff3ed
ok: [router] =>
msg: "The hostname is vyos\e[m and the OS is VyOS 1.3-rolling-202007130117\e[m"
META: ran handlers
META: ran handlers
PLAY RECAP ***************************************************************************************************************************
router : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
The text was updated successfully, but these errors were encountered:
SUMMARY
Discoveryed facts have a trailing
\e[m
after values and or linesfor example
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
vyos 1.3-rolling-202007130117
STEPS TO REPRODUCE
ansible-playbook -vv -CD playbooks/boxes/vyos.yml
EXPECTED RESULTS
ACTUAL RESULTS
What the result i got in the debug print was:
The text was updated successfully, but these errors were encountered: