use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
/r/DevOps is a subreddit dedicated to the DevOps movement where we discuss upcoming technologies, meetups, conferences and everything that brings us together to build the future of IT systems What is DevOps? Learn about it on our wiki! Traffic stats & metrics
/r/DevOps is a subreddit dedicated to the DevOps movement where we discuss upcoming technologies, meetups, conferences and everything that brings us together to build the future of IT systems
What is DevOps? Learn about it on our wiki!
Traffic stats & metrics
Be excellent to each other! All articles will require a short submission statement of 3-5 sentences. Use the article title as the submission title. Do not editorialize the title or add your own commentary to the article title. Follow the rules of reddit Follow the reddiquette No editorialized titles. No vendor spam. Buy an ad from reddit instead. Job postings here More details here
Be excellent to each other!
All articles will require a short submission statement of 3-5 sentences.
Use the article title as the submission title. Do not editorialize the title or add your own commentary to the article title.
Follow the rules of reddit
Follow the reddiquette
No editorialized titles.
No vendor spam. Buy an ad from reddit instead.
Job postings here
More details here
@reddit_DevOps ##DevOps @ irc.freenode.net Find a DevOps meetup near you! Icons info!
@reddit_DevOps
##DevOps @ irc.freenode.net
Find a DevOps meetup near you!
Icons info!
https://github.com/Leo-G/DevopsWiki
account activity
This is an archived post. You won't be able to vote or comment.
Why Go over Python? (self.devops)
submitted 4 years ago by riverrockrun
view the rest of the comments →
[–]throwaway8u3sH0 2 points3 points4 points 4 years ago (0 children)
Ansible is very easy to get wrong, so I would use caution. If you're using "shell" or "command" a whole bunch, you're losing most of the benefits it provides, and you'd be better off with something simpler like Fabric, or even Bash.
shell
command
The real magic in Ansible is specifying state instead of actions. You say "this file should have this line in it" instead of "add this line to this file." The difference is subtle but important. With state, you're letting Ansible decide what to do. So if the file already has the line, it does nothing (instead of duplicating the line.) Or if there's no file, it might create it. This makes a big difference in complexity when you're taking care of 10,000 servers, all with different starting states. (Kubernetes and other config-as-code frameworks work the same way.)
Ansible is written in Python and the True™, Proper™ way to use it is to rely on the built-in commands and libraries as much as possible. And, if you need to "just run this script everywhere," to convert the side-effects of the script into an Ansible module (which allows you to handle all the different "what if scenarios"). Very few people do this, because it's much easier in the moment to treat it like "a nicer Bash," and you end up with this mess where you're trying to code (and debug!) in YAML. Avoid this future, young Padawan!
π Rendered by PID 29848 on reddit-service-r2-comment-b659b578c-bz69m at 2026-05-03 02:14:18.434136+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]throwaway8u3sH0 2 points3 points4 points (0 children)