How do I make my_dir available for all hosts? - Ansible

0 votes
How do I make my_dir available for all ansible hosts?
Feb 1 in Ansible by Kiara
14 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey @Kiara, 

f you want to make my_dir available to all hosts, define group variable for a special group all like:

file ./group_vars/all:

my_dir: "{{ home_dir }}/sub_dir/my_dir"

This way my_dir will be constructed based on home_dir extra variable and be available as a group variable for all hosts.

answered Feb 1 by Anisha

Related Questions In Ansible

0 votes
1 answer

How do I get a list of all Ansible variables?

Ansible by default gathers facts about machines ...READ MORE

answered Jan 30 in Ansible by Mahir
92 views
0 votes
1 answer
0 votes
1 answer

How do I execute a shell script and then use the result in ansible

This can work out for you: - name: ...READ MORE

answered Apr 11, 2018 in Ansible by shubham
• 6,480 points
213 views
0 votes
1 answer

What all can I do with Ansible?

Ansible is capable of doing a lot ...READ MORE

answered Jan 8 in Ansible by Takeshi
14 views
+13 votes
2 answers
0 votes
1 answer
0 votes
2 answers

How do i install Ansible using virtualenv

Adding to @Mohit's answer,  For CentOS and RHEL: sudo ...READ MORE

answered Jan 10 in Ansible by Dikinson
41 views
0 votes
1 answer

How do I improve performance for network playbooks?

Hey @Anjali, these are few of the ...READ MORE

answered Jan 31 in Ansible by Ani
10 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.