Code Monkey home page Code Monkey logo

Comments (2)

chidanandpujar avatar chidanandpujar commented on July 24, 2024

@mamathac
Thanks,
This issue occurs from Ansible core version 2.15 onwards , due to following fix .
ansible/ansible@e1d298e

Reported issue in Ansible github and will follow up .

ansible/ansible#80989

(venv) root@nms5-salt-master-b:~/ansible_get_unresolved_route/ansible-junos-stdlib/tests# cat issue_619_p3_roles.yml 
---
- name: Testing Juniper Junos Core Modules
  hosts: all
  connection: local
  gather_facts: no
  roles:
    - Juniper.junos

  tasks:
    - name: Get Junos Facts
      juniper_junos_facts:
         savedir: "."
      register: nc_response
      tags:
        - ans_get_facts1

    - name: Get Print Facts
      debug: msg= "{{ nc_response.facts }}"
      tags:
        - ans_get_facts2

    - name: "Verify- juniper_junos_facts "
      assert:
        that:
          # Basic things which should be true regardless of the device or software.
          #- "nc_response['facts']['hostname'] == inventory_hostname"
          - "nc_response['facts']['hostname'] in nc_response['facts']['fqdn']"
          - "nc_response['facts']['domain'] in nc_response['facts']['fqdn']"
          - "nc_response['facts']['re_name'] in nc_response['facts']['hostname_info']"
          - "nc_response['facts']['hostname'] == nc_response['facts']['hostname_info'][nc_response['facts']['re_name']]"
          - "nc_response['facts']['personality'] in nc_response['facts']['model']"
          - "'master_state' in nc_response['facts']"
          - "'has_2RE' in nc_response['facts']"
          - "nc_response['facts']['version'] == nc_response['facts']['junos_info'][nc_response['facts']['re_name']]['text']"

      tags:
        - ans_get_facts3
    - name: "TEST 2 - juniper_junos_facts - savedir - directory Listing of JSON facts file"
      find:
        paths: "."
        patterns: "{{ inventory_hostname }}-facts.json"
      register: paths_response
      tags: ans_get_facts4

Thanks & Regrads
Chidanand

from ansible-junos-stdlib.

chidanandpujar avatar chidanandpujar commented on July 24, 2024

@mamathac
Ansible has closed the issue with following fix .

    - name: Get Print Facts
      debug: msg="{{ nc_response.facts }}"
      tags:
        - ans_get_facts2

    - name: Get Print Facts
      debug:
        msg: "{{ nc_response.facts }}"
      tags:
        - ans_get_facts2

Thanks & Regards
Chidanand

from ansible-junos-stdlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.