Question

I am using ansible to install node.js and npm on Debian wheezy VMs following the steps in the Backports section of this .

The following playbook task used to work nicely with conventional ansible ssh mode.

- name: install npm
shell: curl https://www.npmjs.org/install.sh | sh creates=/usr/bin/npm

Until I tried to enable pipelining of ansible 1.5. now it fails with:

npm-install-18570.sh: 246: npm-install-18570.sh: cannot open /dev/tty: No such device or address

The downloaded shellscript install.sh references /dev/tty in line 246 and therefore fails when executed with ansible in pipelining mode.

Can I disable pipelining just for this one task?
Is there another option?"

Was it helpful?

Solution

There's no option to disable pipelining for a single task AFAIK. Keep in mind that Ansible 1.5 is still in development stages.

However, as a workaround you can run your task on a separate playbook passing the pipelining=False environment variable to override the value of your ansible.cfg file:

ansible-playbook -i ./your-inventory-file -e "pipelining=False" your-no-pipeline-playbook.yml

This as per described here (from Ansible docs):

Ansible also allows configuration of settings via environment variables. If these environment variables are set, they will override any setting loaded from the configuration file. These variables are for brevity not defined here, but look in ‘constants.py’ in the source tree if you want to use these. They are mostly considered to be a legacy system as compared to the config file, but are equally valid.

and here:

https://github.com/ansible/ansible/blob/devel/lib/ansible/constants.py

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top