Running Ansible Bash profile shows messages everytime a terminal is opened

0 votes

I've added a few commands in my ~/.bash_profile file and since then every time I open a new terminal I get these weird messages.

Why is that so?

bash_profile file:

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

Terminal messages:



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!
Jan 14 in Ansible by Laksha

edited Jan 14 49 views
What commands did to add and what messages do you see?
# Setup Ansible
cd ~/github/ansible
source ./hacking/env-setup
cd ~
export ANSIBLE_HOSTS=~/ansible_hosts
# End Ansible Setup

messages on terminal:

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!

1 answer to this question.

0 votes

Change the bash profile to read like this instead:

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

This will just redirect standard output and error to /dev/null which will silence the messages.

answered Jan 14 by Cobe

Related Questions In Ansible

0 votes
1 answer

Running ansible command on a single server when it is deployed to multiple servers

You can try the run_once attribute: Example from ...READ MORE

answered Jun 13, 2018 in Ansible by DareDev
• 6,810 points
124 views
+1 vote
1 answer

Is it possible to append a large amount of text to a file using Ansible?

Here is concept which you can follow. blockinfile is ...READ MORE

answered Jul 30, 2018 in Ansible by Atul
• 10,240 points
1,909 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer