Gentoo Archives: gentoo-user

From: hydra <hydrapolic@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Usign ansible
Date: Fri, 30 Jan 2015 18:32:11
Message-Id: CAG6MAzTT4qZ_u=HHb03ZckASNu5ChHOLNZesw+=AYKaMJbUUtw@mail.gmail.com
In Reply to: Re: [gentoo-user] Usign ansible by "Stefan G. Weichinger"
1 On Fri, Jan 30, 2015 at 5:01 PM, Stefan G. Weichinger <lists@×××××.at>
2 wrote:
3
4 > On 29.01.2015 11:31, hydra wrote:
5 > > I haven't migrated to group_vars yet, so try and let us know ;)
6 >
7 > It took me a bit of fiddling but I think I figured it out.
8 >
9 > I had to get the directory structure correct ... now I have
10 >
11 > /etc/ansible/inventories/group_vars/
12 >
13 > with files like siteA, siteB, siteC ... containing the specific variables.
14 >
15 > At first I always had /etc/ansible/group_vars ... and that didn't work
16 > at all!
17 >
18 > Now I am able to have such a small playbook for the whole dhcp-config of
19 > one site:
20 >
21 > ---
22 > - hosts: siteA
23 > user: root
24 > roles:
25 > - dhcpd
26 >
27 > and this pulls the group_vars from
28 >
29 > /etc/ansible/inventories/group_vars/siteA
30 >
31 > and applies it to the dhcpd-role
32 > and overrides /etc/ansible/roles/dhcpd/defaults/main.yml ... which was
33 > my original goal!
34 >
35 > nice!
36 >
37 > Stefan
38 >
39 >
40 >
41 By the way, you don't need to have it in /etc/ansible, feel free to have it
42 anywhere.

Replies

Subject Author
Re: [gentoo-user] Usign ansible "Stefan G. Weichinger" <lists@×××××.at>