ansible-galaxy installation instructions
See original GitHub issueIssue 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:
- Created 3 years ago
- Comments:7 (3 by maintainers)

Top Related StackOverflow Question
@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.
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.