Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added iostype details in network ios_facts module #46599

Merged
merged 1 commit into from
Oct 10, 2018
Merged

Added iostype details in network ios_facts module #46599

merged 1 commit into from
Oct 10, 2018

Conversation

lucabrasi83
Copy link
Contributor

SUMMARY

As part of Cisco network devices inventory, we need to be able to differentiate between IOS vs IOS-XE devices. IOS-XE devices (ASR, ISR 4000, CSR1000V) run IOSd and have a very similar CLI as IOS devices https://en.wikipedia.org/wiki/Cisco_IOS_XE.

The current ios_facts module uses the CLI 'show version' command to gather Cisco IOS details. Since IOS-XE devices run a Linux kernel, we can capture the following output 'X86_64_LINUX_IOSD-UNIVERSALK9-M' from the same command to determine whether it is an IOS-XE device. If not, we return IOS as the iostype.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ios_facts module.

ANSIBLE VERSION
ansible 2.8.0.dev0
  config file = None
  configured module search path = [u'/Users/sebastianpouplin/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/sebastianpouplin/.pyenv/versions/2.7.15/envs/ansible_venv/lib/python2.7/site-packages/ansible
  executable location = /Users/sebastianpouplin/.pyenv/versions/ansible_venv/bin/ansible
  python version = 2.7.15 (default, Jul 30 2018, 17:17:13) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)]
ADDITIONAL INFORMATION
PLAY [Gather Cisco IOS/IOSXE Inventory Facts] ************************************************************************************************************************************************************

TASK [Collect Facts] *************************************************************************************************************************************************************************************
ok: [CSR1000V_RTR1]
ok: [CSR1000V_RTR2]

TASK [Print Version] *************************************************************************************************************************************************************************************
ok: [CSR1000V_RTR1] => {
    "msg": "IOS-XE"
}
ok: [CSR1000V_RTR2] => {
    "msg": "IOS-XE"
}

PLAY RECAP ***********************************************************************************************************************************************************************************************
CSR1000V_RTR1              : ok=2    changed=0    unreachable=0    failed=0    skipped=0
CSR1000V_RTR2              : ok=2    changed=0    unreachable=0    failed=0    skipped=0

@ansibot
Copy link
Contributor

ansibot commented Oct 7, 2018

@ansibot
Copy link
Contributor

ansibot commented Oct 7, 2018

Hi @lucabrasi83,

Thank you for the pullrequest, just so you are aware we have a dedicated Working Group for network.
You can find other people interested in this in #ansible-network on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. networking Network category new_contributor This PR is the first contribution by a new community member. support:network This issue/PR relates to code supported by the Ansible Network Team. labels Oct 7, 2018
@privateip privateip merged commit 4ba0cfe into ansible:devel Oct 10, 2018
@mkrizek mkrizek removed needs_triage Needs a first human triage before being processed. labels Oct 12, 2018
Tomorrow9 pushed a commit to Tomorrow9/ansible that referenced this pull request Dec 4, 2018
@dagwieers dagwieers added ios Cisco IOS community cisco Cisco technologies labels Feb 23, 2019
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 cisco Cisco technologies core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. ios Cisco IOS community module This issue/PR relates to a module. networking Network category new_contributor This PR is the first contribution by a new community member. support:network This issue/PR relates to code supported by the Ansible Network Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants