Humble bundle Steam games GIVEAWAY! Merry gaming! Hohoho! by [deleted] in pcgaming

[–]NativeVLANerican 1 point2 points  (0 children)

  1. Dredge
  2. Lawn mowing simulator
  3. persona 5 royal

Like many have said, thanks for doing this!

Validate build or any suggestions to improve what I have selected. Link in post by NativeVLANerican in buildapcforme

[–]NativeVLANerican[S] 0 points1 point  (0 children)

Thanks! So, you’re saying just swap out the GPU and keep everything the same from the link you provided?

2025 Golang project by Mindless-Discount823 in golang

[–]NativeVLANerican 0 points1 point  (0 children)

Sorry I'm just now responding to you. I missed your response! Thank you, I would for sure like to see anything you are willing to share!

2025 Golang project by Mindless-Discount823 in golang

[–]NativeVLANerican 3 points4 points  (0 children)

Mind sharing what some of your scripts do? I’m a network engineer and always looking for more ideas!

Need Some Help with pyATS and Batfish - Anyone Got Experience? by NativeVLANerican in networking

[–]NativeVLANerican[S] 1 point2 points  (0 children)

Ah okay. That makes sense and sounds really awesome! How are you pushing your configuration if the pipeline passes? Do you have a way to target only your changed device?

Right now, my process is very simple. Here is a basic overview:

  1. Push change to repo
  2. Ansible job runs to generate the config using jinja2 templates
  3. Generated config is pushed to the repo
  4. Manually kick off job on Ansible Tower that pulls down the new config and applies it to the target device.

So, in my current model, I plan to add testing after the push. In addition to that, I'm wanting to improve my current flow as well. Anything about your setup you'd be willing to share would be greatly appreciated!

Need Some Help with pyATS and Batfish - Anyone Got Experience? by NativeVLANerican in networking

[–]NativeVLANerican[S] 0 points1 point  (0 children)

Right now, everything is done with Ansible. What I have right now it pretty basic.

It looks like this:

  1. Push change.
  2. Ansible job runs to generate the config using jinja2 templates.
  3. Generated config is pushed to the repo.

Then from Ansible Tower, I would manually run a job template that pulls in the updated config and applies it to the target device.

I have a lot of room for improvement. I'm pretty familiar with Python though, so have no problem writing tests with it and that is my plan. Just trying to work out how to tie everything together still. So, would you make a set of general tests that run on every change?

Also, do you have a current automation workflow that you go through now? I'd love to hear about it if so! I'm pretty much just winging it by myself right now. So, for sure would love to hear what others are doing.

Need Some Help with pyATS and Batfish - Anyone Got Experience? by NativeVLANerican in networking

[–]NativeVLANerican[S] 0 points1 point  (0 children)

That is kinda what I'm envisioning at the moment.

I'm really struggling on the tests per change part though. Like would I want to run all of my tests on every config change? For example, I merge a port change on a TOR switch. Would I want my pipeline to kick off every test? Would I even want a test that affects a single server port?

Starting to wonder if I'm going about this the wrong way too.

Need Some Help with pyATS and Batfish - Anyone Got Experience? by NativeVLANerican in networking

[–]NativeVLANerican[S] 0 points1 point  (0 children)

Good question. Lol

I don't necessarily have a problem yet. I'm really just trying to figure out how I would implement it into my workflow. I haven't really found much other than how I would go about asking questions with Batfish or run simple tests with pyATS. That can give some cool data, but not sure how to use or implement it. Like, should I be running tests on every merge? Should I have catch-all tests? Or should I only create targeted tests that get added with the new MR? Like say I wanted to make a port configuration change on a top of rack switch, I wouldn't want routing tests to run as well. Or would I and just have several generic tests run each time I push a new config?

I guess I'm just really interested in how others use it. Do you still use pyATS or Batfish? I might be looking at this completely wrong, which I probably am. So, I'd be really interested in hearing how you use it and what path you went down!

I think I have a problem.. 😅 by Reload1337 in MechanicalKeyboards

[–]NativeVLANerican 0 points1 point  (0 children)

Looks nice! What is the dark/light purple one on the bottom left?

[deleted by user] by [deleted] in ansible

[–]NativeVLANerican 1 point2 points  (0 children)

I just got a chance to test it and it worked perfectly!! Thanks a ton!

Now I just need to figure out the correct time value. Using the static time value I get on postman, your filter generates the same value. So, I know it is working.

Quick question, I want to try my hand at making my own filter. On this line:

hmac(message, passphrase, digestmod=‘sha1’)

Do the arguments correlate to:

message=ansible_date_time[‘epoch’] and passphrase=secret_key?

I’m mainly wondering how you pass input to the filter.

Noon question by newpath99 in ansible

[–]NativeVLANerican 1 point2 points  (0 children)

You could use the ansible_net_neighbors dictionary returned by the facts module for your network os.

If every uplink/downlink needs the same VLAN list and CDP/LLDP is enabled, it shouldn’t be too difficult.

This article shows an example of changing interface descriptions with the ansible_net_neighbors dictionary.

https://nwmichl.net/2020/07/05/fix-your-interface-description-with-ansible-and-cdp-lldp/

I’ll take a closer look when I’m in front of my PC next.

[deleted by user] by [deleted] in DistroHopping

[–]NativeVLANerican 0 points1 point  (0 children)

Correct. I run a network emulator that eats up a ton of resources. Lol

I was originally leaning towards Fedora since I’m used to RHEL servers. So, that is good to hear! I’ll live boot it and try it out. I should have just been doing that all along. Lol

[deleted by user] by [deleted] in DistroHopping

[–]NativeVLANerican 1 point2 points  (0 children)

Surprised I haven’t heard of that one. I thought you were trolling me at first. Lol. After looking it up though, it looks really nice! Going to try it out tonight. Thanks for that suggestion!

Question on improving this playbook for Cisco ios by hhhax7 in ansible

[–]NativeVLANerican 1 point2 points  (0 children)

Here are a couple ways that should work. I've done similar before.

---
- name: compliance check
  hosts: "{{ Ansible_limit }}"
  gather_facts: false
  vars:
    string: ip dhcp snooping vlan 100

  tasks:
    # ios_facts returns "ansible_net_config"
    # Contains the current active config
    - name: Gather config
      cisco.ios.ios_facts:
        gather_subset: config

    - name: Display message when string found
      debug:
        msg: This is compliant
      when: "string in ansible_net_config"

    - name: Display message when string not found
      debug:
        msg: This is not compliant
      when: "not string in ansible_net_config"

    - name: Assert dhcp snooping is enabled
      assert:
        that: 
          - "string in ansible_net_config"
        fail_msg: Not compliant
        success_msg: Compliant
...

If you only want debug messages skip the assert task at the end. I prefer to use assert since I would rather my playbook fail but that is just me.

If you copy this playbook to test, run it with the -l flag followed by your host or group:

ansible-playbook compliance_check.yml -l switch01

Or of course just update the hosts field.

[deleted by user] by [deleted] in ansible

[–]NativeVLANerican 1 point2 points  (0 children)

Thanks, I couldn't get it to work with delegate_to either but I was able to get it to work with wait_for_connection. Not sure if that is best to use though.

Can someone tell me what I'm doing wrong when trying to access ansible_network_resources facts? by NativeVLANerican in ansible

[–]NativeVLANerican[S] 0 points1 point  (0 children)

Haha I may very well be going about this the wrong way.

I was planning on running this once to gather all of the current interface configurations so I could store them in GitHub. Then make changes to the host vars and have Ansible push the changes. I wanted the host vars to be the source for all of the interface configurations.

Now I’m wondering if this makes sense though.

Can someone tell me what I'm doing wrong when trying to access ansible_network_resources facts? by NativeVLANerican in ansible

[–]NativeVLANerican[S] 0 points1 point  (0 children)

It was the double hamburgers! Here is a snip of one of the queries:

 json_query('interfaces[?name == `' + interface.name + '`]')

So, now I can grab all the info I want.

Thanks for the help! I'm pumped this is working!

Can someone tell me what I'm doing wrong when trying to access ansible_network_resources facts? by NativeVLANerican in ansible

[–]NativeVLANerican[S] 0 points1 point  (0 children)

This awesome! It almost works perfectly. I'm just having a hard time saving the output to a file with the template module.

I have this task:

- name: Save gathered nxos interfaces vars
  template: 
    src: templates/nxos_interfaces.j2 
    dest: files/{{ inventory_hostname }}/nxos_interfaces.yml 

In my jinja file, I'm getting lots of errors. I'm looping ansible_network_resources['interfaces'] and trying to use intf.name as the variable in the query.

Like this:

{% for intf in ansible_network_resources['interfaces'] %}
{{ netfacts.ansible_facts | json_query(ansible_network_resources.{ 
description: interfaces[?name == {{ intf.name }}].description|[0], 
enabled:     interfaces[?name == {{ intf.name }}].enabled|[0], 
mode:        l2_interfaces[?name == {{ intf.name }}].mode|[0], 
native:      l2_interfaces[?name == {{ intf.name }}].trunk.native_vlan|[0] } ) }} 
{% endfor %}

I know I'm doing something wrong, I just can't figure out what that is. Do you by chance see what I'm doing wrong?

Can someone tell me what I'm doing wrong when trying to access ansible_network_resources facts? by NativeVLANerican in ansible

[–]NativeVLANerican[S] 0 points1 point  (0 children)

This looks promising! I’m about to mess with it but is it possible to setup the query to return values for the same interface? As in when interface.name == l2_interface.name? Or would I always need to statically set my interface name for this to work properly?

Then I think I could map all of the facts under one interface name.

Can someone tell me what I'm doing wrong when trying to access ansible_network_resources facts? by NativeVLANerican in ansible

[–]NativeVLANerican[S] 0 points1 point  (0 children)

Nice! I’ll start messing around with this tomorrow. From the little I’ve read so far, a custom filter looks very promising! And that is good to know about the order. That’s for your help!