I am trying to provision a machine on EC2 (I am provisioning it to be a management node for a larger fleet of machines, this is why it has Vagrant and Ansible installed on it)
https://github.com/yn/provisioner
If I understand correctly, then the following line:
ansible.raw_arguments = [‘-e pipelining=True’]
should reduce the number of operations that ansible performs.
AFAICT the number of operations is the same with that line and without, and the output log between the two provisions looks identical, except for different temporary filenames and time-date differences.
I double checked, and the machine that I am provisioning doesn’t have “requiretty” in the /etc/sudoers file. You can test it yourself, the AMI is public.
Any help is appreciated!
No idea what ansible.raw_arguments = ['-e pipelining=True'] does, but
setting pipeline to true in the ansible.cfg enables it ONLY for
connection plugins that support it.
This setting is not intended to have ansible execute less operations,
just allows it to use a streaming pipe instead of having to scp/sftp
everything over.
I created a github gist: https://gist.github.com/yn/4efebad9d72835318ab1
In it, you will see the results of executing two ansible-playbook commands:
ansible-playbook --user=ubuntu --connection=ssh --limit=‘p2’ --inventory-file=/Users/yn/code/mine/provisioner/.vagrant/provisioners/ansible/inventory -vvvv -e pipelining=False playbook.yml
and
ansible-playbook --user=ubuntu --connection=ssh --limit=‘p2’ --inventory-file=/Users/yn/code/mine/provisioner/.vagrant/provisioners/ansible/inventory -vvvv -e pipelining=True playbook.yml
If I understand the documentation correctly, the -e option allows one to override the configuration variables from ansible.cfg on the command line.
The outputs look identical except for various IDs that are generated randomly. How does one know if ansible is using the streaming pipe or not?
wrong, -e is 'extra vars', it does not override configurations, it
overrides variable values, pipelining is not a variable value.