1 |
sorry ... still a bit OT but maybe interesting for others as well: |
2 |
|
3 |
|
4 |
Yesterday I started to modify the following ansible role to fit my needs |
5 |
and work with gentoo target hosts: |
6 |
|
7 |
https://github.com/debops/ansible-dhcpd |
8 |
|
9 |
I modified tasks/main.yml (use portage ... install iproute2 as well) and |
10 |
edited defaults/main.yml to reflect the environment of site A at first. |
11 |
|
12 |
|
13 |
my first testing playbook: |
14 |
|
15 |
--- |
16 |
- hosts: site-A-dhcpd |
17 |
user: root |
18 |
roles: |
19 |
- ansible-dhcpd |
20 |
|
21 |
Now I wonder how to use the same role for configuring site B. |
22 |
|
23 |
defaults/main.yml currently contains the config (vars ... yes) for site |
24 |
A ... |
25 |
|
26 |
A copy of the role is way too redundant ... |
27 |
|
28 |
What is the/a correct and elegant way to do that? |
29 |
|
30 |
Have a defaults/site-B.conf.yml or something and include that in a 2nd |
31 |
playbook? |
32 |
|
33 |
Use some file in the vars/ directory ... ? |
34 |
|
35 |
|
36 |
I am quite sure that this is just a beginner's problem ... but in these |
37 |
days my brain is a bit exhausted by my current workload etc |
38 |
|
39 |
Thanks for any hints, Stefan! |