Couple of Quick Ansible Tips

Tip 1 – RTFM. The Manual is located here:

https://docs.ansible.com/ansible/latest/modules/list_of_network_modules.html

I’ve read a bunch of tech documentation. Honestly, I almost never direct Marines (or anyone else for that matter) to the documentation because it is normally pretty poorly written, or written by people with IQs so incredibly higher than mine that I don’t even know what they are talking about. This is some pretty good stuff. Recommend going back and reading the documentation from the beginning, but if you read my last blog post, you can very easily take the configs I gave you and literally CTRL+C and CTRL+V from config examples at the above link.

Tip 2 – Nest some groups in your inventory file

https://github.com/john-occasionally-blogs/Ansible-blog/blob/master/hosts

Above is an example of what that would look like. Lots to play with here, and I am guessing that implementation will look different depending on your situation.

Tip 3 – *for lab purposes* Auto-accept SSH certificates

Not the best call for a live environment, but in the lab when you want to just down and dirty test some stuff, this will save a bunch of time. All you need to do is navigate to the Ansible.cfg file (see above), and then un-comment the host key auto add line (see above).

This is a super short post, but I figured it would be better for me to get the info out there in smaller chunks, as it is just difficult to get the time to lab this stuff, then write up the blog. Obviously more to come here as I continue to play around with this. Any tips and tricks you have to contribute are absolutely welcome. In addition to spending some more time reading the documentation, I am going to grab Jeff Geerling’s Ansible for DevOps and also check out the YouTube series it spawned. Also, since A Cloud Guru bought Linux Academy, there are more courses available that I am planning on trying out. I already did the Ansible course on GNS3, and really liked it. If you have other Ansible resources, please leave a comment and let me know!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.