3 ms·
I worked on setting up ansible for running a setup playbook on our new virtualised dev environments complete with VirtualBox bugs. Ansible has been a bit of a p
by timwaagh 9y ago
I worked on setting up ansible for running a setup playbook on our new virtualised dev environments complete with VirtualBox bugs. Ansible has been a bit of a pita for me to set up. Try pulling in a git repo with it. It fails and does not even tell you what is up. Helpful error messages anyone? Maybe this tower could help debug some issues. Although it is basically more added complexity. I don't really understand the advantage over running a normal script either, but it was not really my idea. Somehow my team thinks they should not listen when I say something sucks and listen to this rude kid who likes to talk fast, likes to interrupt and call themselves the best ever instead. I might not look cool and my ways are not the latest in cool tech, but I sure as f am experienced and know things. It will be the others problem soon enough I guess. Maybe the advantage is that you get to run it on all servers at the same time. Not that this is a big one when you have like two. Oh well. I guess I'm not quite done with this software until my team realizes maybe I'm not entirely bullshit when I say we should use simple scripts or go straight to docker. Maybe this tower thing can help debug the mess.
- corford 9y agoStrange, http://docs.ansible.com/ansible/latest/git_module.html http://docs.ansible.com/ansible/latest/git_module.html is pretty robust. If you haven't already, try running the playbook with -vvv to get extra debug info printed. You might be running in to a (possibly obscure) local or remote SSH permission issue. You can use ansible.verbose="vvvv" if you're calling the play via vagrant's ansilbe provisioner.
- timwaagh 9y agoOf course I tried -vvv and -vvvv. That did not tell me anything for this issue. I also tried the option where you get a bunch of python scripts. That told me a lot more than I wanted to know. The obvious option of seeing which commands it has run and their in and output just does not seem to be in there.
- corford 9y agoNo idea then, sorry. The only time the git module has failed with me is due to me fucking up my SSH settings in a convoluted environment (SSH Agent on windows workstation -> ansible controller on vagrant ubuntu box -> remote AWS bastion -> repo host with a very restrictive sshd config). In that case, running ansible verbosely gave enough info to point me in the direction of fixing what was wrong with my ssh setup (can't remember now what it was).
- MrOwen 9y agoI will concede that Ansible does not have the best error messages. I've been working with it for a few years now, and knowing the true source of the errors has taken a while just because they're not always very straightforward. That being said, there's lots of smart folks on the IRC channel that are always willing to help. I think the biggest advantage (in your case), is Ansible's idempotent nature. It takes way more work to make your shell script idempotent that it does writing a playbook for the same thing. I'm also curious about your current dev environments. Do you call Ansible through Vagrant or are you using completely Ansible to spin everything up? Getting the runtime environment installed/configured correctly can sometimes be a challenge for people just starting out (it was challenging for me at least) and if you have 10s/100s of engineers trying to set up Ansible properly and run playbooks themselves, you may have a bad time.