mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
Detect VyOS based on /etc/issue (support 1.0.5) (#20221)
* Detect VyOS based on /etc/issue (support 1.0.5) VyOS didn't contain `vyos` in `/proc/version` * Update vyos.py
This commit is contained in:
@@ -50,7 +50,7 @@ class TerminalModule(TerminalBase):
|
||||
|
||||
@staticmethod
|
||||
def guess_network_os(conn):
|
||||
stdin, stdout, stderr = conn.exec_command('cat /proc/version')
|
||||
if 'vyos' in stdout.read():
|
||||
stdin, stdout, stderr = conn.exec_command('cat /etc/issue')
|
||||
if 'VyOS' in stdout.read():
|
||||
return 'vyos'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user