This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ((ansible312) ) (base) rohit@cosmos junos % ansible-test network-integration junos_netconf -vvv | |
| Configured locale: en_US.UTF-8 | |
| RLIMIT_NOFILE: (256, 9223372036854775807) | |
| Falling back to tests in "tests/integration/targets/" because "roles/test/" was not found. | |
| Detected architecture aarch64 for Python interpreter: /Users/rohit/venvs/ansible312/bin/python3.12 | |
| Creating container database. | |
| >>> Container Database | |
| {} | |
| Run command: /Users/rohit/venvs/ansible312/bin/python3.12 /Users/rohit/venvs/ansible312/lib/python3.12/site-packages/ansible_test/_util/target/tools/yamlcheck.py | |
| Working directory: /Users/rohit/dev-workspace/ansible-dev/ansible-junos-stdlib/ansible_collections/junipernetworks/junos |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| playbook | |
| ==========================================. Playbook ============================================= | |
| --- | |
| # Test 2: net_put with network_cli Connection (Expected to Succeed) | |
| # Purpose: Demonstrate correct usage of net_put with network_cli connection | |
| # Prerequisites: | |
| # - SCP must be enabled on device: set system services ssh | |
| # - User must have appropriate permissions | |
| # Expected Result: Should succeed if SCP is properly configured |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ podman run -it registry.redhat.io/ansible-automation-platform-25/ee-supported-rhel9:latest /bin/bash | |
| ansible-galaxy collection list | |
| Package Version | |
| ------------------------- --------- | |
| acme 3.1.0 | |
| ansible-builder 3.1.0 | |
| ansible-compat 24.10.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ cat inventory_junos | |
| [junos] | |
| 192.168.150.168 | |
| # WORKING SETUP | |
| [junos:vars] | |
| ansible_network_os=juniper.device.junos | |
| ansible_ssh_user=ansible |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ------------------------------------------------ Playbook --------------------------------------------------------------- | |
| - name: Configure VLAN via NETCONF on Cisco NX-OS | |
| hosts: nxos | |
| gather_facts: no | |
| connection: netconf | |
| tasks: | |
| - name: Lock the candidate datastore | |
| ansible.netcommon.netconf_rpc: | |
| rpc: lock | |
| xmlns: "urn:ietf:params:xml:ns:netconf:base:1.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Playbook --------------------------------------------------- | |
| - name: NETCONF Confirm Commit Workflow | |
| hosts: nxos | |
| gather_facts: no | |
| tasks: | |
| - name: Stage config in candidate datastore | |
| ansible.netcommon.netconf_config: | |
| target: candidate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --------------------------------------------------------------------------------------------------------------------------- | |
| ----------------------------------- JUNIPER DEVICE EXAMPLE --------------------------------------------------------------- | |
| --------------------------------------------------------------------------------------------------------------------------- | |
| --------------------------------------------- INVENTORY ----------------------------------------------- | |
| [junos] | |
| 192.168.150.168 | |
| [junos:vars] | |
| ansible_network_os=junos | |
| ansible_connection=local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ============================================== Scenario 1 ===================================================== | |
| --------------------- Playbook 1 | |
| --- | |
| - name: Query UCS Fabric Port Query | |
| hosts: localhost | |
| gather_facts: no | |
| vars: | |
| ucs_fi_port_query_api_private_key: "/home/rothakur/Downloads/AnsibleTestRoh-SecretKey.txt" | |
| ucs_fi_port_query_api_key_id: "{{ rothakur_api_key }}" | |
| ucs_fi_port_query_api_uri: "https://intersight.com/api/v1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import absolute_import, division, print_function | |
| __metaclass__ = type | |
| from ansible_collections.juniper.device.plugins.module_utils import configuration as cfg | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| candidate_arista_11(config-acl-test2)#sh ip access-lists | |
| IP Access List ANSIBLE_TEST_ACL | |
| 9 remark ######## QB & SNAPSHOT ACL TEST ################# | |
| 10 deny udp host 192.168.98.11 host 224.0.24.210 eq 21000 | |
| 15 deny udp host 192.168.98.11 host 224.0.24.210 eq 21001 | |
| 5000 permit ip any any | |
| IP Access List ANSIBLE_TEST_ACL_FAILOVER | |
| 9 remark ######## QB & SNAPSHOT ACL TEST ################ | |
| 10 deny udp host 192.168.98.10 host 224.0.24.210 eq 21000 |
NewerOlder