4 ms·
Ansible can be a big step forward from "just shell scripts". I was on the fence for a while, but it does make things easier quite quickly, even for smaller depl
by bayesian_horse 4y ago
Ansible can be a big step forward from "just shell scripts". I was on the fence for a while, but it does make things easier quite quickly, even for smaller deployments. Even for just documenting wtf is running on the servers and how.
- sshine 4y agoWhat I like about Ansible: - It provides a standard procedural format for my shell scripts - It comes with some level of type-checking when I play a script - It makes me actually test that my procedures can bootstrap - The playbook style helps me keep scripts organized - It lets me start from "You have a server." without questioning where it came from. - Ansible, while "bottom-up", lets me bootstrap "top-down" systems like Kubernetes, container registries, etc.
- marcosdumay 4y ago> Ansible can be a big step forward from "just shell scripts". It can be. It also can not-be. I'd recommend anybody to start looking once they reach more than 2 machines, but yeah, depending on what you are doing it can add value when you have 1 or 2 machines too.
- lastofus 4y agoIn my experience, Ansible is fantastic for provisioning a machine from bare Linux VM to running service. OTOH it's quite slow when used for deployments. There's no way you would be getting 5 second deployments with it. My favorite middle ground between shell scripts and Ansible is Fabric (https://www.fabfile.org/ https://www.fabfile.org/).
- e12e 4y agoAnsible isn't a speed demon, but note that Ansible, like docker over ssh (export DOCKER_HOST=“ssh://user@remotehost) greatly benefits from persisted ssh connections - via ~/.ssh/ssh_config or Ansible config. https://docs.rackspace.com/blog/speeding-up-ssh-session-creation/ https://docs.rackspace.com/blog/speeding-up-ssh-session-crea... https://www.redhat.com/sysadmin/faster-ansible-playbook-execution https://www.redhat.com/sysadmin/faster-ansible-playbook-exec... Apparently Docker also let you point at different hosts via "context": https://docs.docker.com/engine/context/working-with-contexts https://docs.docker.com/engine/context/working-with-contexts