Gentoo Archives: gentoo-user

From: "Stefan G. Weichinger" <lists@×××××.at>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Usign ansible
Date: Sat, 17 Jan 2015 21:29:34
Message-Id: 54BAD433.8040002@xunil.at
In Reply to: Re: [gentoo-user] Usign ansible by Alan McKinnon
1 On 12.01.2015 17:46, Alan McKinnon wrote:
2
3 > You'd have to define it yourself in your plays somewhere
4 >
5 > Several ways present themselves:
6 >
7 > - Group customers together by customer name and use the group name.
8 >
9 > - Define the customer directly in the inventory. Generally it isn't
10 > recommended to define variable there, but I think this is one of the few
11 > case where it does make sense. Sort of like this:
12 >
13 > acme_web_server ansible_ssh_host=1.2.3.4 customer=acme
14 >
15 > {{ customer }} then is available for that host whenever the host is in scope
16 >
17 >
18 >
19 > One thing you'll find with ansible is there's always a way to do
20 > something, often more than one way (like perl). And all ways often make
21 > sense (unlike perl)
22
23 sorry for the delay ... busy week
24
25 I still haven't wrapped my head around how to properly define my groups
26 and sets of hosts.. but I am on my way, thanks ;-)
27
28 "learning" ... when it is better to have a group or a when-clause (when
29 OS = Gentoo) ...
30
31 Reading/rsyncing all the configs in isn't first priority now. Although
32 it already is nice-to-have as a server stopped to work this week.
33
34 OK, backups on tape etc ... but I like that basic "profile" with /etc
35 and @world as well.
36
37 -
38
39 I hesitate to mention it as everything with the term "systemd" in it
40 seems to trigger not-directly-helpful replies here ... but I see issues
41 with playbooks/tasks controlling services on hosts running systemd:
42
43 I have openrc and systemd installed/merged (installed with openrc, then
44 migrated to run systemd and openrc still there, but not active ... not
45 removing openrc just to keep it as some fallback) ... and when I try to
46 control services via the service-module of ansible I don't always get
47 valid results. It seems that the module detects openrc installed and
48 doesn't check further (is openrc *active* as well?) ... so I get
49 misleading replies/states in.
50
51 IMO ansible should correctly detect the running PID1 .. and it tries to
52 as far as I understand the code of the service-module.
53
54 For example I tried to write a task to ensure that ntpd is down/disabled
55 and chrony is installed/enabled/started ... no real success so far.
56
57 I will provide more info if needed ... saturday night now, so excuse me
58 stopping here ;-)
59
60 Stefan

Replies

Subject Author
Re: [gentoo-user] Usign ansible Alan McKinnon <alan.mckinnon@×××××.com>