question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ansible-galaxy installation instructions

See original GitHub issue

Issue Type

  • Bug Report

Module Name

Juniper.Junos role and Python libraries version

 ansible --version
ansible 2.9.1
  config file = /opt/nsgtools/NSG_storage/PythonScripts/Operations/juniperUtilities/ansible.cfg
  configured module search path = ['/home/aolk/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/nsgtools/NSG_storage/LR2020/env3/lib64/python3.6/site-packages/ansible
  executable location = /opt/nsgtools/NSG_storage/LR2020/env3/bin/ansible
  python version = 3.6.8 (default, Jun 11 2019, 15:15:01) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

pip freeze
ansible==2.9.1
bcrypt==3.1.7
certifi==2020.4.5.1
cffi==1.14.0
chardet==3.0.4
cryptography==2.9
future==0.18.2
idna==2.9
importlib-metadata==1.7.0
importlib-resources==2.0.1
Jinja2==2.11.1
juniperSNMPv3crypt==0.0.5
junos-eznc==2.5.0
jxmlease==1.0.3
lxml==4.5.0
MarkupSafe==1.1.1
ncclient==0.6.7
netaddr==0.7.20
ntc-templates==1.5.0
orionsdk==0.3.0
paramiko==2.7.1
pycparser==2.20
PyNaCl==1.3.0
pyparsing==2.4.7
pyserial==3.4
PyYAML==5.3.1
requests==2.23.0
scp==0.13.2
six==1.14.0
textfsm==1.1.0
transitions==0.8.2
urllib3==1.25.8
yamlordereddictloader==0.4.0
zipp==3.1.0


OS / Environment

uname -r 3.10.0-1062.1.2.el7.x86_64

cat /etc/os-release NAME=“Red Hat Enterprise Linux Server” VERSION=“7.7 (Maipo)” ID=“rhel” ID_LIKE=“fedora” VARIANT=“Server” VARIANT_ID=“server” VERSION_ID=“7.7” PRETTY_NAME=“Red Hat Enterprise Linux Server 7.7 (Maipo)” ANSI_COLOR=“0;31” CPE_NAME=“cpe:/o:redhat:enterprise_linux:7.7:GA:server” HOME_URL=“https://www.redhat.com/” BUG_REPORT_URL=“https://bugzilla.redhat.com/

REDHAT_BUGZILLA_PRODUCT=“Red Hat Enterprise Linux 7” REDHAT_BUGZILLA_PRODUCT_VERSION=7.7 REDHAT_SUPPORT_PRODUCT=“Red Hat Enterprise Linux” REDHAT_SUPPORT_PRODUCT_VERSION=“7.7”

Summary

Unable to use ansible-galaxy to download collections. Attempts to run playbooks using : ansible-galaxy install juniper.junos also fail and give error : ERROR! couldn’t resolve module/action ‘juniper_junos_command’. This often indicates a misspelling, missing collection, or incorrect module path.

Steps to reproduce

user@hostname:juniperUtilities > ansible-galaxy collection install Juniper.junos_collection

  • downloading role ‘collection’, owned by [WARNING]: - collection was NOT installed successfully: Content has no field named ‘owner’

ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list. user@hostname:juniperUtilities > sudo ansible-galaxy collection install Juniper.junos_collection

[WARNING]: - collection was NOT installed successfully: Failed to get data from the API server (https://galaxy.ansible.com/api/): Failed to connect to galaxy.ansible.com at port 443: [Errno 104] Connection reset by peer

ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list. user@hostname:juniperUtilities > - downloading role ‘collection’, owned by -bash: -: command not found user@hostname:juniperUtilities > user@hostname:juniperUtilities > sudo ansible-galaxy collection install Juniper.junos_collection -c [WARNING]: - collection was NOT installed successfully: Failed to get data from the API server (https://galaxy.ansible.com/api/): <urlopen error [Errno 104] Connection reset by peer>

ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list. user@hostname:juniperUtilities >

    - name: "Save RSI"
      register: rsi_output1
      juniper_junos_command:
        commands:
          - "request support information"
        dest_dir: "/var/tmp/rsi.{{ filename }}.txt"
        provider: "{{ provider }}"
    - debug: var=rsi_output1.stdout_lines

Expected results


Actual results

ERROR! couldn’t resolve module/action ‘juniper_junos_command’. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in ‘/opt/nsgtools/NSG_storage/PythonScripts/Operations/juniperUtilities/pb.junos_get_rsi_logarch.yaml’: line 40, column 7, but may be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: "Save RSI"
  ^ here

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rahkumar651991commented, Jul 27, 2020

@mwadman - we have released an initial version of collection with the respective name “juniper.device” on ansible-galaxy. We are still in the process of fixing few changes. However, you may start using it. Any changes will be mentioned in the release notes and will be updated soon.

0reactions
rahkumar651991commented, Oct 12, 2021

juniper.device is released. This will be used for any collection development in juniper. Closing the issue, as this was raised during initial development of collection and is now not relevant.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Galaxy User Guide - Ansible Documentation
Installing roles from Galaxy ... The ansible-galaxy command comes bundled with Ansible, and you can use it to install roles from...
Read more >
Galaxy Installation with Ansible - Galaxy Training!
Here we'll see how to install a Galaxy server using an Ansible playbook. ... If you follow the official Ansible instructions to install...
Read more >
How to Use Ansible Galaxy - Linux Hint
Ansible Galaxy hosts Ansible roles and collections created by the community. Instead of rewriting them from scratch, you can install it on your...
Read more >
How to use Ansible Galaxy | Enable Sysadmin - Red Hat
Create roles with Ansible Galaxy · ansible-galaxy list displays a list of installed roles, with version numbers. · ansible-galaxy remove <role> ...
Read more >
How to Install Ansible Galaxy Roles and Collections
Install Ansible Galaxy Roles · Search for a role you wish to use · Select the role name for more details · Open...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found