In this DevOpsworld, it sometimes appears the Devhalf gets all the limelight, with Opsthe forgotten half in the relationship. It's almost as if the leading Devtells the trailing Opswhat to do, with almost everything "Ops" being whatever Devsays it should be. Ops, therefore, gets left behind, punted to the back, relegated to the bench.
I'd like to see more OpsDevhappening. So let's look at a handful of things Ansible can help you dowith your day-to-day Ops life.
![Job templates][2]
I've chosen to present these solutions within [Ansible Tower][3]because I think a user interface (UI) adds value to most of these tasks. If you wantto emulate this, you cantest it out in [AWX][4], the upstream open source version of Tower.
### Manage users
In a large-scale environment,your users would be centralisedin a system like Active Directory or LDAP. But I bet there are still a whole load of environments with lots of static users in them, too. Ansible can help you centralise that decentralised problem. And _the community_ has already solved it for us. Meet the [Ansible Galaxy][5] role **[users][6]**.
What's clever about this roleis it allows us to manage users via *data—*no changes to play logic required.
![User data][7]
With simple data structures, we can add, removeand modify static users on a system. Very useful.
### Manage sudo
Privilege escalation comes [in many forms][8], but one of the most popular is [sudo][9]. It's relatively easy to manage sudo through discrete files per user, group, etc. But some folk get nervous about giving privilege escalation willy-nilly and prefer it to be time-bound. So [here's a take on that][10], using the simple **at** command to put a time limit on the granted access.
![Managing sudo][11]
### Manage services
Wouldn't it be great to give a [menu][12]to an entry-level ops team so they could just restart certain services? Voila!
![Managing services][13]
### Manage disk space
Here's[a simple role][14] that can be used tolook for files larger than size _N_ in a particular directory. Doing this in Tower, we havethe bonus of enabling [callbacks][15]. Imagine your monitoring solution spotting a filesystem going over X% full and triggering a job in Tower to go find out what files are the cause.
![Managing disk space][16]
### Debug a systemperformance problem
[This role][17] is fairly simple: it runs some commands and prints the output. The details are printed at the end of the run for you, sysadmin, to cast your skilled eyes over. Bonus homework: use [regexs][18] to find certain conditions in the output (CPU hog over 80%, say).
![Debugging system performance][19]
### Summary
I've recorded a short video of these five tasks in action. You can find all [the code on GitHub][20] too!
Michael DeHaan is the guy who created, in his own words, "that Ansible thing." A lot of the things...
A little bit of coding knowledge can let anyone write small scripts to do these tasks and save them...
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/innovation_lightbulb_gears_devops_ansible.png?itok=TSbmp3_M (gears and lightbulb to represent innovation)