5 ms·
I'm using ansible for some years already. The biggest game changer for me was ansible molecule [0]. I integrated it to the repo, where I store my code and it j
by avaika 5y ago
I'm using ansible for some years already. The biggest game changer for me was ansible molecule [0].
I integrated it to the repo, where I store my code and it just runs all the test cases for my code. It saved me a bunch of hours of investigation in test environments before I even released the code. Highly recommend to try it even for a small project.
Apart of that play with ansible strategies if you have more than one server to apply the role. It really might save you some minutes of a runtime.
[0]: https://molecule.readthedocs.io/en/latest/ https://molecule.readthedocs.io/en/latest/
- willejs 5y agoThis is really great advice. Chef was doing this years ago with test kitchen and inspec (and serverspec). Most community cookbooks came with extensive test suites, and in turn made it easy to encourage people to write tests for cookbooks in house. It seems theres a real lack of testing in opensource Ansible playbooks a lot of the time, and a lot of times when I see it used in organizations.
- dheera 5y agoAfter using Ansible for a while at a company I got massively turned off by the fact the version in apt-get doesn't work and if you go to ansible.com there isn't an obvious download button, there's only a button to register for a goddamn free event. There should be a big fucking red "DOWNLOAD" button at the center of ansible.com, and not a goddamn GDPR intrusion and free event. And then if I search Google for "ansible download" I land at a documentation website with 50 billion links. No. F that. Back to shell scripts. Git clone and run "./install.sh". Most of the things I do are containerized anyway, and the heavy lifting is done by Dockerfile not Ansible, so the install.sh isn't actually that involved. Hey Ansible if you're reading this, head over to https://google.com/chrome/ https://google.com/chrome/. Make your front page look like that with a big obvious download button and no popups.
- 1stranger 5y agoGoogle "install ansible" then follow the instructions for your OS. I'm sorry you can't read.
- dheera 5y agoThe purpose of Ansible is so you can get a system up and running without having to waste time e.g. reading stuff. Big fail. Also if I have to use Google to search within your website, you fail at website design, or your in-site search engine is crap.
- computershit 5y agoIf you can't be bothered to either `pip install` or `docker run` perhaps Ansible is indeed not the tool for you. What's more, I would assert that "reading stuff" is required for any eng in my industry. Here is a list: * Ansible installation guide (https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installation-guide) * Ansible Getting Started (https://docs.ansible.com/ansible/latest/user_guide/intro_getting_started.html) * the extensive Ansible core module docs (https://docs.ansible.com/ansible/2.9/modules/modules_by_category.html)
- dheera 5y agoAnd how am I supposed to know it's on pip or docker? The command should be smack dab in the middle of the front page of their site. Oh and on a default Ubuntu install I have nejither pip nor docker. If I have to do that much, I might as well not use Ansible and just use my existing bash scripts, which take care of installing pip and docker as well as absolutely everything else. All my existing system setups are just curl https://something/something | bash which is SO much simpler.
- computershit 5y agoIt's literally on the first page of the docs. I don't see what is so hard about this. Most of these frameworks require some research so that you understand the tool works. As an aside, I feel such crusty syseng vibes right now. These young folk want it all point and click, apt-get, spotify me. Are you seriously a grown ass human person in the same industry as me and expecting a huge single button install of a configuration management framework? Ever consider you'd have to build a custom image (whether EC2 or docker or whatever) to support your specific environment? If you want to learn Ansible, learn it. Don't think you can just apt-get and accept defaults here. Asserting right now this is an instance where trying a little harder is required.
- darthrupert 5y ago"The version in apt-get", uh-huh.
- Hackbraten 5y agoDo you feel they’re referring to anything else but a binary package repository belonging to a versioned (Debian-style) distro? It’s not helpful to be snarky.
- avaika 5y agoThat's interesting, that you're talking about docker and that most things in your environment are dockerized, but didn't check the option to run ansible in docker container. There's publicly available image on docker hub which works without issues. PS. Just out of curiosity I just tried "ansible install" in google and ddg and the very first link is pointing to an installation guide [0]. The guide gives a very complete installation instructions with multiple options for various systems. You literally can choose whatever fits your environment more. [0]: https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html https://docs.ansible.com/ansible/latest/installation_guide/i...
- tlamponi 5y ago> After using Ansible for a while at a company I got massively turned off by the fact the version in apt-get doesn't work FWIW: Works just fine here on Debian (using it since Debian 8, now on Debian 11).
- bamboozled 5y agoSame, it saves me so much time knowing my code will work before I have to do a “full run” on a site.yml