Ansible capable of handling diskless clients?

55 views
Skip to first unread message

Uwe Sauter

unread,
May 28, 2015, 8:04:49 AM5/28/15
to ansible...@googlegroups.com
Hi all,

a similar question was already posted on Serverfault
(http://serverfault.com/questions/693698/config-management-for-nfs-root-cluster) but got turned down as being off-topic.

To summarize:

Is Ansible capable of handling diskless clients that only have read-only storage mounted (besides a TMPFS mount)?

===

Long story (Serverfault, but partially rephrased):

I'm running a Linux cluster where each node PXE boots from a NFS share (read-only). Configuration on system boot is done by
scripts within initrd and in /etc/rc.d/ (manually created).

System updates are done within a VM. The VM's filesystem is then copied to a new folder on the NFS share and modified to our
needs. This is currently still done with CFengine2.

I'm looking into freshing up that process. For that I'd like to know if there are other configuration management systems besides
CFengine (2/3) that allow to modify local directory structures (or remote structures that do NOT represent the currently running
system).

As far as I can tell from my quest so far, there are two types of configuration systems that I'd like to call "online" vs.
"offline" or "master/slave" vs. "slave-less" config management systems. (With slave I mean that the configuration is done for the
currently running system, be it via a separate service (Chef / Puppet) or the master connecting to the slave to run system
commands (Ansible / Salt).)

Examples of master/slave systems are Puppet / Chef / Ansible / Salt as their usual Modus Operandi requires one master node that
controls other slave nodes. They also depend on the slave to get back information of the slave's status. One could probably work
around that but as far as I can tell, those systems are not made to handle a huge amount of files / symlink dependencies that are
necessary to provision the NFS folder that acts as root of network booted clients.

CFengine, on the other hand, is a system that allows you to keep the configuration files in a directory structure and copies that
structure into the target directory. It also allows you to manipulate the content of files depending on different circumstances
(yes, other systems allow that, too). As a bonus you can configure other slaves with CFengine as well.

So the question is: does Ansible allow to manage configuration files / folder structures locally (or on several NFS servers, but
only the folder structures, not the servers themselves) without the need for a running slave? If so, how would you configure such
a thing?


Thank you,

Uwe

Brian Coca

unread,
May 28, 2015, 6:18:49 PM5/28/15
to ansible...@googlegroups.com
I don't see a reason it would not.

First ansible normally is run in push mode so not much for it to
manage 'locally'.

Managing services would be the same as with full clients, the issue
here is handling the per server specific configs and general configs.

Most of this can be done with ansible looking at only the 'master' and
treating slave configs as a special path. Another option is to have
ansible know about the slaves and delegate changes for the slaves to
the master + additional pathing to the correct slave configs.


--
Brian Coca

Uwe Sauter

unread,
May 29, 2015, 2:58:38 AM5/29/15
to ansible...@googlegroups.com
Brian,

thanks for your answer.

As I'm not yet familiar with Ansible, do you have any pointers to documentation where I can find what you described (esp. the last
point about additional pathing)?

Brian Coca

unread,
May 29, 2015, 11:23:51 AM5/29/15
to ansible...@googlegroups.com
not really, most configs are handled with the copy or template module,
in the case that you delegate the config to master for 'existing
hosts' you can do something like this for pathing:

- template: src=httpd.conf.j2
dest=/slaves/{{inventory_hostname}}/etc/httpd/httpd.conf
delegate_to: master


inventory_hostname is a variable that contains 'current host'


--
Brian Coca
Reply all
Reply to author
Forward
0 new messages