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, 2019 in Ansible by Laksha

edited Jan 14, 2019 1,788 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, 2019 by Cobe

Related Questions In Ansible

+1 vote
2 answers

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 14, 2018 in Ansible by DareDev
• 6,890 points
2,464 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
14,675 views
0 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,038 views
+2 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Error saying "ERROR: ec2_vpc_subnet is not a legal parameter of an Ansible Play"

ec2_vpc_subnet is support from Ansible version 2.0 and ...READ MORE

answered Feb 8, 2019 in Ansible by Dee
1,107 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP