Category: Ansible
-
Formatting Slack Messages Sent By Ansible
I’ve been sending some messages via ansible playbooks to slack and I ran into issues when I tried sending clickable links. Luckily the ansible slack module has the options you need. Here’s an example of sending a standard message: – name: send message through slack slack: token: "{{ slack_token }}" msg: | "http://GregSowell.com" "This is…
-

Controlling Cisco ACI with Ansible
It’s no secret that I’m a Cisco fanboy. I started networking on Cisco kit and honestly got all of my foundations from studying for Cisco certs. So it should come as no surprise that I like finding excuses to automate Cisco in interesting ways. This was my first experience with automating Cisco ACI(Application Centric Infrastructure)…
-

Ansible Omnibus Examples – Filtering, Loops, Conditionals, Tips
The great sales leader Tony Owens once said “Steal the wheel, don’t reinvent it.” With that in mind, here’s my github repo; feel free to grab and modify when/where you can. I plan to revisit and update this article on a semi regular basis to keep adding new content, so keep checking back. Also I…
-

Ansible Zabbix Modules – Controlling Maintenance Mode
Ansible has a lot of good Zabbix control modules found here:. zabbix_action – Create/Delete/Update Zabbix actions zabbix_group – Create/delete Zabbix host groups zabbix_group_info – Gather information about Zabbix hostgroup zabbix_host – Create/update/delete Zabbix hosts zabbix_host_info – Gather information about Zabbix host zabbix_hostmacro – Create/update/delete Zabbix host macros zabbix_maintenance – Create Zabbix maintenance windows zabbix_map –…
-

Automated Network Troubleshooting With Ansible Tower And Zabbix
In the role of a network engineer one of the most common tickets/requests we receive is “I can’t reach this thing.” Well that or “the internet is down.” It’s at this point that I ask for the destination IP, then I start the standard pings/traceroutes…but what if I could do all of this before the…
-
Ansible Terminal Expansion With Mikrotik
Mikrotik routers are, I’m finding, well suited to be used with Ansible as infrastructure as code. I was recently working on a project where I was pulling “/ip firewall nat print without-paging terse”, but the returned output kept adding in \n (carriage returns) on the 81st position…*sigh*. "stdout": [ "0 comment=ReverseNAT chain=srcnat action=src-nat to-addresses=2.1.\n25.64 src-address=1.1.1.1…
-
Install An SSL Cert For Ansible Tower Using LetsEncrypt
This can be done in the span of about 5 minutes(it’s almost tooooo easy). First, ensure that you have public access to TCP ports 80/443 to your tower server(it’s likely you’ve already done that, though). Tower auto installs and uses nginx as its webserver. Step one is to tell nginx what your FQDN is for…