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 |
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
ISSUES | |
------------------------------------------------------------------------------------------------------------------------------------------ | |
---------------------------------------- ISSUE 1 --------------------------------------------------------------------------- | |
Show Vlan | |
--- | |
- name: Manage Vlans | |
hosts: ios | |
collections: |
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
ansible-playbook [core 2.16.11] | |
config file = /etc/ansible/ansible.cfg | |
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] | |
ansible python module location = /usr/lib/python3.11/site-packages/ansible | |
ansible collection location = /runner/requirements_collections:/root/.ansible/collections:/usr/share/ansible/collections | |
executable location = /usr/bin/ansible-playbook | |
python version = 3.11.7 (main, Oct 9 2024, 00:00:00) [GCC 11.4.1 20231218 (Red Hat 11.4.1-3)] (/usr/bin/python3.11) | |
jinja version = 3.1.4 | |
libyaml = True | |
Using /etc/ansible/ansible.cfg as config file |
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
ansible-playbook [core 2.16.6] | |
config file = None | |
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] | |
ansible python module location = /usr/local/lib/python3.12/site-packages/ansible | |
ansible collection location = /runner/requirements_collections:/root/.ansible/collections:/usr/share/ansible/collections | |
executable location = /usr/local/bin/ansible-playbook | |
python version = 3.12.2 (main, Feb 21 2024, 00:00:00) [GCC 13.2.1 20231205 (Red Hat 13.2.1-6)] (/usr/bin/python3) | |
jinja version = 3.1.3 | |
libyaml = True | |
No config file found; using defaults |
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
127.0.0.1 - - [22/Oct/2024:11:04:31 +0000] "GET /api/gateway/v1/ping/ HTTP/1.1" 200 112 (0.048) "-" "Envoy/HC" "-" request-id: "-" | |
[pid: 47|app: -|req: -/-] 127.0.0.1 (-) {32 vars in 354 bytes} [Tue Oct 22 11:04:31 2024] GET /api/gateway/v1/ping/ => generated 112 bytes in 47 msecs (HTTP/1.1 200) 11 headers in 345 bytes (1 switches on core 0) x-request-id: - | |
127.0.0.1 - - [22/Oct/2024:11:04:32 +0000] "POST /v3/discovery:listeners HTTP/1.1" 200 3432 (0.035) "-" "-" "10.131.0.66" request-id: "-" | |
[pid: 47|app: -|req: -/-] 127.0.0.1 (-) {40 vars in 544 bytes} [Tue Oct 22 11:04:32 2024] POST /v3/discovery:listeners => generated 3432 bytes in 34 msecs (HTTP/1.1 200) 8 headers in 244 bytes (1 switches on core 0) x-request-id: - | |
127.0.0.1 - - [22/Oct/2024:11:04:32 +0000] "POST /v3/discovery:clusters HTTP/1.1" 200 3395 (0.036) "-" "-" "10.131.0.66" request-id: "-" | |
[pid: 45|app: -|req: -/-] 127.0.0.1 (-) {40 vars in 542 bytes} [Tue Oct 22 11:04:32 2024] POST /v3/discovery:clusters => generated 3395 bytes in 35 msecs (HT |
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
--- | |
- name: Fetch Postgres secret and pod details and create inventory file | |
hosts: localhost | |
gather_facts: no | |
tasks: | |
- name: Fetch the Postgres secret | |
kubernetes.core.k8s_info: | |
api_version: v1 | |
kind: Secret | |
name: myaap-gateway-postgres-configuration |
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
- name: Register services | |
ansible.builtin.include_role: | |
name: "{{ gw_config_role }}" | |
vars: | |
gateway_http_ports: "{{ gateway_proxy_vars.gateway_http_ports | d([]) }}" | |
gateway_service_clusters: "{{ gateway_proxy_vars.gateway_service_clusters | d([]) }}" | |
gateway_service_nodes: "{{ gateway_proxy_vars.gateway_service_nodes | d([]) }}" | |
gateway_services: "{{ gateway_proxy_vars.gateway_services | d([]) }}" | |
gateway_routes: "{{ gateway_proxy_vars.gateway_routes | d([]) }}" |
NewerOlder