This is a tip for people who need to have snippets of code at their fingertips to program faster. Now that I’m revisiting all my Ansible infrastructure as code (IaC), I realize the mess I had lying around, so I discovered Snippets!
Atom Snippets allow you to fill in and create code by just typing a few letters that you define and pressing TAB. Right now, I’m putting this comment in all my Jinja2 templates:
1 2 3 4
################################################ # {{ ansible_managed }} # LAST MODIFIED ON: {{ ansible_date_time.date }} ################################################
So every time I see a file managed by Ansible, I’ll/we’ll know it.
Snippets are configured under File > Snippets. Here are the ones I have for Jinja2: