Shell Provisioner running ansible-playbook is slow

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Shell Provisioner running ansible-playbook is slow

john pradeep
Hi,
I am trying to provision a vagrant box through Ansible and it works very well, but i wanted to support provisioning from a windows machine and unfortunately Ansible doesnt work on windows! which made me to use a shell provisioner, and from within the script file i invoke "ansible-playbook" command, but for some reason the execution is very very slow and it doesn't maintain the colour of the output from ansible even if i use the "Keep_color" to true.

In order to verify that the problem is with the provisioner, I ssh'd to the virtual machine and ran the ansible-playbook command directly which runs quick as expected.

Any Advice what could be going wrong that slows down the shell provisioner?

Thanks,
John

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shell Provisioner running ansible-playbook is slow

Torben Knerr
Hi John,

as for the colored vagrant output on windows you can try this:
https://github.com/tknerr/bills-kitchen/blob/master/files/set-env.bat#L67-69

As for the slow ansible-playbook command: no idea. Is it always faster
the second time you run it?

HTH,
Torben


On Fri, Oct 17, 2014 at 9:37 PM, john pradeep <[hidden email]> wrote:

> Hi,
> I am trying to provision a vagrant box through Ansible and it works very
> well, but i wanted to support provisioning from a windows machine and
> unfortunately Ansible doesnt work on windows! which made me to use a shell
> provisioner, and from within the script file i invoke "ansible-playbook"
> command, but for some reason the execution is very very slow and it doesn't
> maintain the colour of the output from ansible even if i use the
> "Keep_color" to true.
>
> In order to verify that the problem is with the provisioner, I ssh'd to the
> virtual machine and ran the ansible-playbook command directly which runs
> quick as expected.
>
> Any Advice what could be going wrong that slows down the shell provisioner?
>
> Thanks,
> John
>
> --
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Shell Provisioner running ansible-playbook is slow

VMTrooper
In reply to this post by john pradeep
Hello John,

You may want to try the development version of Ansible. I saw that either version 1.7 or 1.8 will support Windows management with commands being executed in PowerShell on the target server.

-Trevor

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shell Provisioner running ansible-playbook is slow

Vassilis Rizopoulos
Piping things through SSH on a Windows host, slows down things significantly.

I guess I can safely assume you're using SSH since your guest runs Ansible

I have had similar issues with Capistrano and large quantities of stdout output coming over the SSH connection and only noticed because they brought a bug of my system under test to the surface. The more output is generated the slower the process gets.

I have only theories and no proof as to what this could be (you know, deadlines rushing past etc.). One way to verify if this is an issue it to time your installation on silent mode (so as little stdout as possible) and see if it makes a difference. 
I work around such issues by logging to a file and pulling the file only when an error occurs.

Cheers,

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shell Provisioner running ansible-playbook is slow

john pradeep
Vassilis,
Yes, you are right, it's the stdout output coming over the SSH connection that slows everything down. I might have to take the same approach as you did.


Thanks,
John

On Monday, October 20, 2014 8:19:39 AM UTC+1, Vassilis Rizopoulos wrote:
Piping things through SSH on a Windows host, slows down things significantly.
 
I guess I can safely assume you're using SSH since your guest runs Ansible

I have had similar issues with Capistrano and large quantities of stdout output coming over the SSH connection and only noticed because they brought a bug of my system under test to the surface. The more output is generated the slower the process gets.

I have only theories and no proof as to what this could be (you know, deadlines rushing past etc.). One way to verify if this is an issue it to time your installation on silent mode (so as little stdout as possible) and see if it makes a difference. 
I work around such issues by logging to a file and pulling the file only when an error occurs.

Cheers,
V.-

--
<a href="http://www.ampelofilosofies.gr" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.ampelofilosofies.gr\46sa\75D\46sntz\0751\46usg\75AFQjCNG8OHw3uzfeDlU2ni5oFX2Za-wJvw';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.ampelofilosofies.gr\46sa\75D\46sntz\0751\46usg\75AFQjCNG8OHw3uzfeDlU2ni5oFX2Za-wJvw';return true;">http://www.ampelofilosofies.gr

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.