On Monday, May 11, 2015 at 1:11:32 AM UTC-4, Marcus Franke wrote: > > > Hi, > > > > > For example, in my toolkit, to ping a server I would run: > > > > fab role ping > > > > but from one of the first examples in the Ansible intro docs, it would > be: > > > > ansible all --inventory-file=inventory.ini --module-name ping -u > username --private-key=~/path/to/private_key > > You should have a look for the ansible.cfg configuration. If you put one > into your project directory you can define the ansible_user, inventory and > key file for this user and do not need to specify them on the command line. > I think the "all" group is default, no need to issue. > > This would result in: > ansible -m ping > > I'm relatively new to ansible, haven't had performance problems so far. I > think you can speedup things by configuring ansible to run in parallel or > break your hosts down into smaller groups. ansible will "compile" a python > script from your playbooks, transfers and runs it on the destination > servers. This takes some time, I guess. > > Regards, > Marcus >
Thanks, that's interesting. I was hoping I'd overlooked something. I'm mainly looking at Ansible because I want a simpler tool to speed up my deployments. I currently manage a multi-tenent multi-server application, so my "full deployment" looks like: * install system packages * install custom service configurations (Apache/Postgres/MySQL/RabbitMQ/etc) * install pip packages * upload custom static media * install custom application code * initialize N databases * apply Django/South migrations for N databases * restart/reload services Obviously, most of these tasks don't need to be done for every deployment. They only need to be done once initially, and then again when an underlying resource changes in my code repo. To run this full process takes about 45 minutes, so instead I'll manually run subsets of this process. This is much faster, but it can be hacky and prone to error if I overlook something (e.g. I updated my pip requirements but forgot to install the new package). I'm hoping to find a configuration management tool with a form of idempotency that will achieve this by keeping a local ledger of differences between production and the repo. Unfortunately, I can't find anything in the Ansible docs that suggests it can work this way, meaning Ansible would have to run every step of the process. I find it really difficult to believe that no one else finds the concept of a local ledger useful. I've gotten into heated debates with Puppet/Chef fans for even suggesting the idea, and they fervently claim that checking every server's *entire configuration* for every deployment is the only acceptable implementation of idempotency in a CM tool. They don't care about tasks that take minutes to run even if no changes need to be made. For example, I use several dozen Django applications in my project, so running "manage.py migrate" can take about 15 minutes to run even if no migrations are pending because it checks every application across every database. Is this a problem anyone else has had to deal with? What's the usual solution in Ansible? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e3b64895-a742-47c8-addb-8b1e426a094f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
