Slow operations with Ansible

Hello,

I'm doing some basic commands: mkdir, chmod, copy, etc... and most of
the commands run slowly.

Is there a way to speed things up? If it requires code changes that
need to be implemented, what possible strategy to improve the code is
available to make these command execute faster? Thoughts?

I like ansible's concepts and would like to continue using it if it
were faster.

-J

First off, you didn’t specify what branch you were using.

If you are using sudo mode, in particular on the master branch, sudo is somewhat primitive. It is VASTLY improved on the development branch, where various sleeps have been replaced by proper parsing logic.
Let me know if that’s the case.

Another thing you may be interested is Ansible in --connection=local mode (also development branch), where we’re going to implement some very nice things to bootstrap Ansible normally and then run it in pull mode
over cron. This is going to be FANTASTIC for repeated configuration management and is already in work, though we’re still hashing some details out. It will scale easily to tens of thousands of nodes but still be easy
to install in even existing environments that aren’t configured with any CMS whatsoever.

Generally (if not using master branch sudo), I don’t find Ansible to be slow for me at all, so you may have some random network issues on your end. There has been some work to reduce the number of various
operations, but these are not orders of magnitude differences. Some optimization can still be done around reusing tempdirs thus reducing the need for some mktemp and delete operations, which would probably
improve general SSH operations by about 25%. It’s also on my rather distant radar to support additional transports as an option (i.e. message buses and such) but I think SSH is so appealing for so many different
reasons (security, no bootstrap, cloud) that the local connection mode and using Ansible to set up ansible in pull mode is the most elegant solution.

More details welcome!

–Michael