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

juniper.device not working for container environment #704

Open
flycoolman opened this issue Dec 9, 2024 · 0 comments
Open

juniper.device not working for container environment #704

flycoolman opened this issue Dec 9, 2024 · 0 comments

Comments

@flycoolman
Copy link

Issue Type

  • Bug Report

Module Name

juniper.device collection and Python libraries version

Container: juniper/pyez-ansible

bash-5.0# ansible --version
ansible 2.10.8
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.8/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.8.5 (default, Jul 20 2020, 23:11:29) [GCC 9.3.0]

OS / Environment

Summary

juniper.device not working for container environment

Steps to reproduce

xxxx-macbook juniper % docker run -it --rm -v $PWD:/project juniper/pyez-ansible ansible-playbook -i juniper_inventory_test pb_get_hostname_sn_version_by_facts_juniper.yaml --user "xxx" -k

---

- name: Get device basic info
  hosts: 
    - all
  gather_facts: false

  tasks:
    - name: Retrieve facts from Junos devices
      juniper.device.facts:
        savedir: "{{ playbook_dir }}"

    - name: Get hardware inventory
      juniper.device.command:
        commands: "show chassis hardware"
        dest_dir: "{{ playbook_dir }}"
...

Expected results

Get the playbook running successfully

Actual results

ERROR! couldn't resolve module/action 'juniper.device.facts'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/project/pb_get_hostname_sn_version_by_facts_juniper.yaml': line 25, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


    - name: Retrieve facts from Junos devices
      ^ here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant