Hi there

Is there in ansible a way so set an linux environment variable for a ad-hoc 
mode and store it permanently in some place?
I tried host_vars, but that doesn't worked. 

I want to run this command:
ansible all -m shell -a "DEBIAN_FRONTEND=noninteractive apt-get upgrade”

without the need to explicit define DEBIAN_FRONTEND and make 
DEBIAN_FRONTEND=noninteractive the default for the shell module.

I don't want to use a playbook, because normally I run ansible all -m shell 
-a "apt-get upgrade -s” to see what would be changed, and than 
afterwards to run it without "-s". I often forgot to set 
 DEBIAN_FRONTEND=noninteractive in the ad-hoc command call. 

I don't want that this the default for the normal environment, when I ssh 
outside of ansible.

A possible workaround would be if I could recognize an ansible ssh 
connection from the inside of the host and than set the environment 
variable accordingly. 
Any idea who to do it?
Or is there a proper ansible way of doing this?

thanks
yves


-- 
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/89250ef8-3966-444f-91b1-366d9ca607b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to