Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] ansible daemon
Date: Sat, 18 Nov 2017 21:44:16
In Reply to: [gentoo-user] ansible daemon by Damo Brisbane
1 On 18/11/2017 23:36, Damo Brisbane wrote:
2 > Hi,
3 >
4 > I am wanting to have continuously running ansible daemon to push out
5 > desired state to some servers. I do not see such functionally covered
6 > within readme ( Am I correct to
7 > assume that if I want to run ansible as a daemon, I will have to set up
8 > [if I want] *ansible user*, init.d/ansible rc script? 
9 >
10 > Also note I haven't used Ansible in production - I am assuming that
11 > running as a daemon is best for this scenario.
14 You assume wrong. Ansible is not a daemon, it does not listen and cannot
15 be a daemon. When you need ansible to do something, you give it a play
16 to run and it does it. Then the play ends and the command quits. There
17 isn't really much scope for having ansible "continuously run", it does
18 not know when you have changed things that need updating - only you know
19 that.
21 I think you want Tower or AWX or even rundeck, those are
22 scheduling/controlling/orchestration wrappers that can fire off ansible
23 jobs.
24 As a last resort you can always add a cron to run an overall site.yml
25 play every X hours or so
28 Are you coming from a puppet/salt/chef world? If so, the one thing to
29 always keep in mind is this:
31 Ansible is almost, but not quite, entirely unlike Puppet.
33 --
34 Alan McKinnon
35 alan.mckinnon@×××××.com