Skip to content

Instantly share code, notes, and snippets.

View rohitthakur2590's full-sized avatar

Rohit Thakur rohitthakur2590

View GitHub Profile
@rohitthakur2590
rohitthakur2590 / consildated_examples.txt
Created April 28, 2025 06:00
Consolidated Juniper Device Collcetion Examples
---------------------------------------------------------------------------------------------------------------------------
----------------------------------- JUNIPER DEVICE EXAMPLE ---------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
--------------------------------------------- INVENTORY -----------------------------------------------
[junos]
192.168.150.168
[junos:vars]
ansible_network_os=junos
ansible_connection=local
============================================== 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"
@rohitthakur2590
rohitthakur2590 / juniper_junos_docs.py
Created February 24, 2025 11:14
define junos_docs.py with DOCUMENTATION Example
from __future__ import absolute_import, division, print_function
__metaclass__ = type
from ansible_collections.juniper.device.plugins.module_utils import configuration as cfg
@rohitthakur2590
rohitthakur2590 / ana_613.txt
Created December 27, 2024 07:28
ana613_logs
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
ISSUES
------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------- ISSUE 1 ---------------------------------------------------------------------------
Show Vlan
---
- name: Manage Vlans
hosts: ios
collections:
@rohitthakur2590
rohitthakur2590 / job_template_log.txt
Created November 14, 2024 11:52
failure_log_job_template
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
@rohitthakur2590
rohitthakur2590 / infra.ee_utilities.ee_builder.log
Created November 5, 2024 13:15
Run the Ansible Builder Program
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
@rohitthakur2590
rohitthakur2590 / gateway traceback
Created October 22, 2024 11:07
gateway traceback
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
@rohitthakur2590
rohitthakur2590 / pod_info_to_inventory.yml
Created August 30, 2024 13:16
Create Inventory in case of operator install
---
- 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
- 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([]) }}"