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, 2019 in Ansible by Kiara
1,119 views

1 answer to this question.

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, 2019 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 31, 2019 in Ansible by Mahir
6,109 views
0 votes
1 answer

How do I see all the inventory variables defined for my host?

Hey @Junaid, You can see all the ...READ MORE

answered Jan 31, 2019 in Ansible by Mahir
1,930 views
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
• 7,340 points
6,892 views
0 votes
1 answer

What all can I do with Ansible?

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

answered Jan 8, 2019 in Ansible by Takeshi
844 views
+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,036 views
+2 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, 2019 in Ansible by Dikinson
5,583 views
0 votes
1 answer

How do I improve performance for network playbooks?

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

answered Feb 1, 2019 in Ansible by Ani
791 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