Posts

Showing posts with the label ansible

Mounting data onto your filesystem for fun and unfortunately no profit

A little more than a year ago I was working for a client that desired to have a simple way do do an inventory of their linux servers (running SLES ). They had their networking DTAP configured to make every environment only available via a bastion host and only that host. Luckily you can do a lot with Ansible in conjunction with ProxyCommands (see  https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Proxies_and_Jump_Hosts ) so reaching the servers was not really a problem and since Ansible's excellent setup  module provides a wealth of information, I had all the ingredients I needed, I just needed to connect the dots. Since I wanted to learn more about filesystems (and FUSE in particular) I thought it would be a nice exercise to try and "map" the collected data from Ansible's setup module onto a mountpoint to make it easy to grep and parse and all that jazz. Since the data format Ansible uses is JSON anyway, I thought it would be best to first focus on creating a script...