Gentoo Archives: gentoo-user

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

Replies

Subject Author
Re: [gentoo-user] Usign ansible hydra <hydrapolic@×××××.com>