7 ms·
Ansible 4.0
- encryptluks2 5y agoPretty cool but Ansible just seems too slow to me. I'm just comparing this against like native scripting, Terraform, etc. I guess Ansible is still the best option for configuration management, but I keep hoping someone will come out with a new tool, preferably built with Go or Rust.
- grosswait 5y agoI doubt building ansible in go or rust we save more than a few ms in the average playbook run.
- blcknight 5y agomgmt config is written in go and has a lot of interesting concepts.
- purpleidea 5y agoThanks for looking out for us =D Link for any who's interested: https://github.com/purpleidea/mgmt/ https://github.com/purpleidea/mgmt/ I and others have been working quite hard on it, so please come join us =D
- kungfufrog 5y agoHey there, I've been following "mgmt" for years, hoping it was going to be the next big thing. I did see a while ago that you made a significant investment in developing mgmt full-time but then didn't see much news out of the community afterwards. I'm curious whether there's a status update you could provide? I'd love to get involved as I think it truly represents a next generation style config management system, but I also had fears it was dead in the water or not being actively developed!
- nerdbaggy 5y agosalt has been great for me. SSH is just so slow compared to always on zeromq
- yjftsjthsd-h 5y agoMaybe, but I feel safe exposing openssh to the open internet, which is more than I can say for salt.
- takeda 5y agoIn properly set up environment things like that should never been exposed outside.
- yjftsjthsd-h 5y agoNot every environment can provide an internal network.
- takeda 5y agoActually you always have an option to properly secure. If you have own data center and more than one machine you do have a LAN. I'm guessing you're talking about public cloud like AWS. Similarly you can have private subnets (which is the best practice). If you have a single instance that's only public, you can place definitions on local S3 and have instance pull it. You can secure everything so it's not accessible from outside, and you don't need service to be available from the outside. If you have multiple instances and all are on public subnets and talk to each other over the Internet, you should rethink your design, but at very least have firewall configured. Security groups that list themselves could help. Let me know if you have some other scenario.
- yjftsjthsd-h 5y agoIn a word: Hetzner. Dedicated servers scattered across data centers, sufficiently numerous to make IPAM too painful to manually tie them together with wireguard. It's possible that some sort of overlay network or VPN could be made to work, but I could also just expose port 22 with only public key auth enabled, use ansible, and be done.
- purpleidea 5y agoUm, you've seen https://github.com/purpleidea/mgmt/ https://github.com/purpleidea/mgmt/ right ;) Join us!
- candiddevmike 5y agoRed Hatters keep leaving the company and building config management tools =D. For mgmt, I don't see anything particularly novel that it brings to the space. It doesnt use YAML, but if I'm going to write pseudocode I may as well reach for Pulumi or python. Why would you recommend mgmt over Ansible or Terraform? Since this can use Consul, why wouldn't I just use Consul for event driven changes?
- dralley 5y agoWhile I don't have any hard numbers, I would bet a lot of money that any "slowness" of ansible has nothing to do with the use of Python. Everything happens over SSH, that's a lot of network roundtrips.
- deadbunny 5y agoIndeed. See saltstack for something that does the same thing, witten in python that runs much faster.
- Fizzadar 5y agoSSH can be quicker, I believe ansibles use of SSH processes is more the issue. An old but still relevant benchmark exists in my pyinfra project which uses SSH (amongst other protocols) but a Python implementation, and its significantly quicker and more scalable than ansible: http://docs.pyinfra.com/en/1.x/performance.html http://docs.pyinfra.com/en/1.x/performance.html
- tundrax 5y agoPuthon doesn't seem to be the performance issue here, but remote operations on target hosts.
- stevekemp 5y agoI wrote a proof-of-concept tool, inspired by puppet more than anything, but since it runs locally it is perhaps comparable to ansible too: https://github.com/skx/marionette/ https://github.com/skx/marionette/ It turns out that three operations suffice for almost 90% of my needs: * Populate a file, from a template with variable expansion. * Run a shell-command. * Install a package. I added support for pulling a docker container too, just for fun. Although I never made the effort to pimp/promote it, the tool is stable and useful as-is.
- 0xbadcafebee 5y ago> I guess Ansible is still the best option for configuration management Ansible is perhaps the worst option, next to CFEngine and some other legacy ones. It's just the one everyone goes for because nobody wants to maintain a puppet/chef/salt/etc server, and encoding a bastardized DSL in YAML seems easier than writing Ruby.
- apple4ever 5y agoI run Mitogen which makes it super fast. There was some discussion of merging them. But the Ansible side got all grumpy and refused. It was a bad decision, because it hurts Ansible being so slow.
- pabl0rg 5y agoIt was harder than I expected to find the changelog so I’ll leave the link https://github.com/ansible-community/ansible-build-data/blob/main/4/CHANGELOG-v4.rst https://github.com/ansible-community/ansible-build-data/blob...
- blondin 5y agochecked the release notes and it seems like they still don't allow you to run ansible with "python -m". that would have fixed a few issues with virtual environments.
- keyle 5y agoI always cringe when I read the word 'final'. :) Too many years in the industry with projects called final... Basically a tag saying 'this shit ain't never gonna be over! Run for the hills!'. And nothing is more set in stone than a bunch of yml ;) /s
- coldtea 5y agoYou keep using the word final. I don't think it means what you think it means... Here it doesn't mean "the project is done, no more development". It just means this is the official release of version 4.0 - e.g. no more betas, etc.
- pram 5y agoFinal as in it's the actual release and not a candidate, not that it's the final version of Ansible jfyi
- oneplane 5y agoWe have a word that describes that better than 'final': release. And if it's on physical media, you could even call it GM (Golden Master). They are not words that stand on their own, you would combine it with the artifact name and the version you are releasing. Release of the following: Name: ansible Version: 4.0.0 Combined, it's the "Ansible 4.0.0 Release" in whatever order makes sense. If you have something that is not a release, then you would not call it a release. But if you think you are close to a release and you want to be sure, you could state that this is a candidate but not entirely sure. You can even have multiple incarnations of candidates. You end up with a "release candidate" and you could suffix it with number if you have more than one. While many creators and vendors some up with all sorts of schemes, there are a few standards available with extensive documentation like https://semver.org https://semver.org or simply mimic what well-respected projects are using. The problem is of course that nobody agrees on anything if you have a large quantity of things (including large quantity of people), and the urge to create 'a standard to fix the mess' which just adds to the mess in the end. This whole thing is of course not all that important in the grand scheme of things, and an intersection of the 'standards' XKCD commic and 'everything is great and nobody is happy' seems to be where we end up every time.
- zmmmmm 5y agoI know Ansible has a huge number of fans but I am genuinely curious about the future. That is, I've been trying to figure out where ansible fits in the bigger picture of the modern trend towards IaC. Is it in conflict with that because of its semi-imperative nature? Or is what it does an essential piece of how IaC needs to work to do declarative infrastructure management? I see that for example you can use ansible within terraform. Do people really do that and is it useful? Or is it something you would only do if you have a lot of legacy infrastructure already configured via Ansible. Curious on the general take here.
- rbjorklin 5y agoI’d say that a tool like Packer is heavily reliant upon Ansible to be useful so I don’t see Ansible going anywhere anytime soon. If there’s a better tool than Ansible out there to pair with Packer please let me know!
- ddreier 5y agoThis is now our primary use of Ansible as well. We install and minimally configure systems in machine images, then use cloud-init to do the remaining 1% of config at VM build time.
- cies 5y agoWe dropped Ansible and Packer when we went with containers (instead of AMIs). Ok we still use a small bit of Ansible: the vault feature.
- dcolkitt 5y agoEven in container world, I still find Ansible/Chef useful for a number of low-level system tuning tasks. Things like setting NUMA affinities, modifying kernel parameters, setting IRQ interrupts, loading kernel modules, setting NIC parameters, etc. That kind of stuff is often overlooked, but done right can have pretty dramatic performance impact.
- Alex3917 5y ago> That is, I've been trying to figure out where ansible fits in the bigger picture of the modern trend towards IaC. As a developer working on a small startup, I don't like using Docker because it makes the fan on my MBP go crazy and drains the battery almost instantly. Whereas I've had zero problems with VirtualBox. Until containerization actually works properly and provides a good developer experience, I can't see myself switching unless forced.
- benatkin 5y agoAnsible is under the GPLv3 but they say this doesn't apply to your .yml files because those are data, not code. I think they're interpreted code. The yml has steps which aren't too different from statements. If what the project creator says matters, the GPL has less legal meaning. I personally think the GPLv3 does protect more than just compiled code, and that Ansible is off their rocker with the GPL.
- yjftsjthsd-h 5y agoIf it's interpreted and not compiled, then when would it matter? It never creates a derivative work that contains code from you and from ansible. Edit: For that matter, ansible only runs on your own local machine. Without redistribution, the GPL doesn't really have teeth anyway.
- aduitsis 5y agoFirst of all, congratulations to the team of Ansible and these tools have benefited us in numerous ways that cannot be understated. Having said that, this caught my eye: > There may be backwards incompatibilities in the core playbook language. Please see the porting guide for details. Doing incompatible changes is not something specific to Ansible, for example Puppet has also done it time and again. We've been using both Ansible and Puppet in my previous job, and we always found it mildly annoying that upgrading a system (Linux, FreeBSD) would, in addition to the other "usual" dangers, bring along the danger of the new version not having a package for the "old" version of Puppet or Ansible that we were using. Which would force us to divert attention to the automation tool's problems instead of using the automation tool to solve problems. I do understand that nothing can stand still and everything must evolve and change, but at some point this acquires the flavour of changes for the sake of changes. Especially when regressions happen and things that were working perfectly are now breaking, it is not exactly pleasant to have to devote time to them. It's not exactly clear how can Perl programs or shell scripts or Makefiles from 20 years ago play perfectly fine unchanged, but the syntax of a manifest or playbook that does a couple of simple operations cannot remain stable. It's not like those tools were created yesterday, in which case it would be reasonable to expect changes in their first years.
- AJAlabs 5y agoWith verison 4.0.0, they've implemented semantic versioning which should make life easier for avoiding breaking backwards compatibility changes. https://semver.org https://semver.org
- asiachick 5y agoDoes that make it easier or does it just mean you'll be more aware upfront that to get the security fixed or support you need for some new feature you need to upgrade to an incompatible version
- jacobsenscott 5y agoAll semver does is tell you you are pinned to some obsolete tool, and you are going to go through a soul sucking 6 months of yak shaving to stay up to date. (rails programmer since v3 here) Semver doesn't make life easier. Making backward compatible changes is what makes life easier.
- VectorLock 5y agoIs there any big improvements or whats the benefit of porting to Ansible 4 (other than it seems Ansible 3 is EOL'd now)
- lobo_tuerto 5y agoLink to previous discussion: https://news.ycombinator.com/item?id=27215477 https://news.ycombinator.com/item?id=27215477
- mtlynch 5y ago>Due to a limitation in pip, if you are upgrading from Ansible 3 (or earlier), you need to uninstall Ansible and Ansible Base before installing Ansible 4: Does anyone know what they're talking about? This is a pain to deal with in my app, and I've never seen it with any other pip package.
- geerlingguy 5y agoUnfortunately due to some things that happened with the way they renamed packages after the split (from ansible to ansible-core and ansible-base), it required a full 'uninstall and reinstall' operation, otherwise Pip gets things a bit confused and the installation breaks completely. There was a Herculean effort to try to get it to just upgrade cleanly, but in the end it turned out there was no way.
- mtlynch 5y agoAh, gotcha. Thanks for the clarification, Jeff!
- 0xbadcafebee 5y ago"Due to a limitation in pip, if you are upgrading from Ansible 3 (or earlier), you need to uninstall Ansible and Ansible Base before installing Ansible 4" Was it really a limitation in Pip? Or did the Ansible devs just really want this non-backwards-compatible release to use the same name as before, just so they wouldn't have to use a new package name like "ansible4"? Even though that would allow both pre-ansible4 and ansible4 scripts to co-exist? And considering everybody has to test and update their code for ansible 4 anyway?? This seems to just cause more pain for devs and admins with no real benefit. Which is to say, par for the course. This is the main reason I have always hated using Ansible. Arbitrary decisions leading to a cumbersome, bloated, undocumented, difficult mess.
- secondcoming 5y agoThis broke us. Some crap about sftp. Three hours down the drain.
- Spivak 5y agoWhy are you blindly upgrading? The only safe way to use Ansible in production or on a team is to pin the version everyone uses because even minor releases can break playbooks and change behavior.
- secondcoming 5y agoI'm not sure of the details, but it has something to do with the modern way of CI/CD pulling in random 3rd party docker containers.
- r1cka 5y agoSounds like your docker was pulling latest instead of a versioned tag. I'd update that and be happy this only cost you a few hours.
- shaicoleman 5y agoTheir versioning is unnecessarily confusing. Why call it version 4 and then when you run --version it shows a different version? $ ansible --version ansible [core 2.11.0] $ python -c 'from ansible_collections.ansible_release import ansible_version; print(ansible_version)' 4.0.0
- Spivak 5y agoBecause after Ansible 2.9 they made a huge change in how module resolution works and put most of the modules in a separate repository to be versioned independently.
- polskibus 5y agoDoes anyone use Ansible in GitOps ? If so, what other tools do you use? Gitlab? Other? If not, what would you recommend for non-Kubernetes infrastructure for GitOps?
- InitEnabler 5y agoIs there any open source alternatives to Ansible, Terraform, Chef, Puppet, etc?