Question

I'm installing Ansible, and have added the commands below to my ~/.bash_profile file.

# Setup Ansible
cd ~/github/ansible
source ./hacking/env-setup
cd ~
export ANSIBLE_HOSTS=~/ansible_hosts
# End Ansible Setup

Now every time I open a new Terminal window, it logs the message below.

Setting up Ansible to run out of checkout...

PATH=/github/ansible/bin:/Users/.../.rvm/gems/ruby-2.0.0-p0/bin:/Users/.../.rvm/gems/ruby-2.0.0-p0@global/bin:/Users/.../.rvm/rubies/ruby-2.0.0-p0/bin:/Users/.../.rvm/bin:/Users/.../sbt/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin PYTHONPATH=/Users/.../Documents/Projects/eclipse-workspace/ansible/ansible/lib: ANSIBLE_LIBRARY=/Users/.../Documents/Projects/eclipse-workspace/ansible/ansible/library MANPATH=/Users/.../Documents/Projects/eclipse-workspace/ansible/ansible/docs/man:

Remember, you may wish to specify your host file with -i

Done!

How can I prevent the Terminal from logging these messages?

Was it helpful?

Solution

You can change the bash profile to read like this instead:

cd ~/github/ansible
source ./hacking/env-setup >& /dev/null
cd ~

Or just:

source ~/github/ansible/hacking/env-setup >& /dev/null

This will just redirect standard output and error to /dev/null, silencing the messages.

Hope this helps!

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