Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Usign ansible (was: another old box to update)
Date: Thu, 08 Jan 2015 18:29:23
Message-Id: 54AECC76.3020107@gmail.com
1 Copy pasted into new thread as subject has changed:
2
3
4 Stefan said:
5 ===
6 played around with ansible today and managed to get this working:
7
8 http://blog.jameskyle.org/2014/08/automated-stage3-gentoo-install-using-ansible/
9
10 I even forked his repo and added a load of features to my newly built
11 gentoo-systems (systemd, git, german locale, chrony ...). Nice.
12
13 I still have to come up with a proper directory tree ... the docs at
14
15 http://docs.ansible.com/playbooks_best_practices.html
16
17 show a tree that seems a bit huge for my needs.
18
19 One of my next goals: get all my local hosts into it and see how to
20 manage them.
21 ===
22
23
24 The directory layout in the best practice page is indeed way more than
25 you need, it lists most of the directories in common use across a wide
26 array of deployments. In reality you create just the directories you need.
27
28 Global stuff goes in the top level (like inventory).
29 Variables for groups and individual hosts go into suitably named files
30 inside group_vars and host_vars.
31 Roles have a definite structure, in practice you'll use tasks/ and
32 templates/ a lot, everything else only when you need them.
33
34 This is a good design I feel. If a file describes variables, you don't
35 have to tag it as such or explicitly include it anywhere. Instead, files
36 inside a *vars/ directory contain variables, the system knows when to
37 use them based on the name of the file. It's really stunningly obvious
38 once you train your brain to stop thinking in terms of complexity :-)
39
40
41
42 --
43 Alan McKinnon
44 alan.mckinnon@×××××.com

Replies

Subject Author
Re: [gentoo-user] Usign ansible (was: another old box to update) "Stefan G. Weichinger" <lists@×××××.at>