[racktables-users] Re: Ansible

  • From: Bram Daams <racktables@xxxxxxxxxxxxx>
  • To: racktables-users@xxxxxxxxxxxxx
  • Date: Wed, 3 Oct 2018 10:09:44 +0200

Hi Sander,

We do something similar, just the other way around.

From our config management system (not ansible), we add machines to
racktables that are not yet in it. Make sure you decide about what your
'single source of truth' is.

In case of RT, you could create a plugin/report that generates the
ansible inventory file. And download that (wget/curl) to the location
you want it.

In case of Ansible, you'll need a script that parses the inventory and
generates a list of server names, then add missing servers to racktables
(we use direct database access for that last part). You could also think
of using Ansible to set server properties in RT, like Manufacturer, OS,
Model, Service tag etc.

Bests,

Bram


On 09/04/2018 09:31 AM, Sander Klein wrote:

Hi,

I was wondering if anyone was using racktables and create their
ansible host inventory from it? Pointers would be welcome ;-)

Greets,

Sander

Other related posts: