Lago Ansible Inventory Script

Howdy, Since I didn't find anything searching around, I decided to start implementing a dynamic inventory script for Lago for my local environment while trying to keep it as generic as possible. If you'd be interested I'd like to share it and get feedback but I am not sure where is the best place for me to place it or offer it to Lago via a PR. Eric

On 15 June 2016 at 14:50, Eric Helms <ehelms@redhat.com> wrote:
Howdy,
Since I didn't find anything searching around, I decided to start implementing a dynamic inventory script for Lago for my local environment while trying to keep it as generic as possible. If you'd be interested I'd like to share it and get feedback but I am not sure where is the best place for me to place it or offer it to Lago via a PR.
Not sure what you mean by, "dynamic inventory". -- Barak Korren bkorren@redhat.com RHEV-CI Team

On Wed, Jun 15, 2016 at 7:56 AM, Barak Korren <bkorren@redhat.com> wrote:
Howdy,
Since I didn't find anything searching around, I decided to start implementing a dynamic inventory script for Lago for my local environment while trying to keep it as generic as possible. If you'd be interested I'd like to share it and get feedback but I am not sure where is the best
On 15 June 2016 at 14:50, Eric Helms <ehelms@redhat.com> wrote: place
for me to place it or offer it to Lago via a PR.
Not sure what you mean by, "dynamic inventory".
See [1] for official reference. Instead of writing a static inventory script of hostnames, IPs and groupings Ansible allows writing a script to be run that produces that information dynamically. [1] http://docs.ansible.com/ansible/intro_dynamic_inventory.html
-- Barak Korren bkorren@redhat.com RHEV-CI Team

On 06/15 07:59, Eric Helms wrote:
On Wed, Jun 15, 2016 at 7:56 AM, Barak Korren <bkorren@redhat.com> wrote:
Howdy,
Since I didn't find anything searching around, I decided to start implementing a dynamic inventory script for Lago for my local environment while trying to keep it as generic as possible. If you'd be interested I'd like to share it and get feedback but I am not sure where is the best
On 15 June 2016 at 14:50, Eric Helms <ehelms@redhat.com> wrote: place
for me to place it or offer it to Lago via a PR.
Not sure what you mean by, "dynamic inventory".
See [1] for official reference. Instead of writing a static inventory script of hostnames, IPs and groupings Ansible allows writing a script to be run that produces that information dynamically.
[1] http://docs.ansible.com/ansible/intro_dynamic_inventory.html
+1 from me, I'll like to investigate it a bit too :) (I'm not that familiar with ansible, yet)
-- Barak Korren bkorren@redhat.com RHEV-CI Team
_______________________________________________ lago-devel mailing list lago-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/lago-devel
-- David Caro Red Hat S.L. Continuous Integration Engineer - EMEA ENG Virtualization R&D Tel.: +420 532 294 605 Email: dcaro@redhat.com IRC: dcaro|dcaroest@{freenode|oftc|redhat} Web: www.redhat.com RHT Global #: 82-62605

See [1] for official reference. Instead of writing a static inventory script of hostnames, IPs and groupings Ansible allows writing a script to be run that produces that information dynamically.
Ah ok. I failed to realise that was in the Ansible context. +1 from me as well. Could we also assign server roles/Ansible variable from the Lago YAML? Would we want to? -- Barak Korren bkorren@redhat.com RHEV-CI Team

On Wed, Jun 15, 2016 at 8:20 AM, Barak Korren <bkorren@redhat.com> wrote:
See [1] for official reference. Instead of writing a static inventory script of hostnames, IPs and groupings Ansible allows writing a script
to
be run that produces that information dynamically.
Ah ok. I failed to realise that was in the Ansible context.
+1 from me as well. Could we also assign server roles/Ansible variable from the Lago YAML? Would we want to?
You could/can and that would depend on how we write the inventory script. Currently my script will parse out group assignments from the metadata. This would probably be clearer seeing the source code and an example. Would opening an issue with be best? Or a pull request with an example output to then decide where the script should live?
-- Barak Korren bkorren@redhat.com RHEV-CI Team

On 15 June 2016 at 15:41, Eric Helms <ehelms@redhat.com> wrote:
On Wed, Jun 15, 2016 at 8:20 AM, Barak Korren <bkorren@redhat.com> wrote:
See [1] for official reference. Instead of writing a static inventory script of hostnames, IPs and groupings Ansible allows writing a script to be run that produces that information dynamically.
Ah ok. I failed to realise that was in the Ansible context.
+1 from me as well. Could we also assign server roles/Ansible variable from the Lago YAML? Would we want to?
You could/can and that would depend on how we write the inventory script. Currently my script will parse out group assignments from the metadata. This would probably be clearer seeing the source code and an example. Would opening an issue with be best? Or a pull request with an example output to then decide where the script should live?
I'd say start with an issue. WRT to where will that live, would an output format plugin for 'Lago status' be a reasonable place for this? -- Barak Korren bkorren@redhat.com RHEV-CI Team

On Wed, Jun 15, 2016 at 8:53 AM, Barak Korren <bkorren@redhat.com> wrote:
On 15 June 2016 at 15:41, Eric Helms <ehelms@redhat.com> wrote:
On Wed, Jun 15, 2016 at 8:20 AM, Barak Korren <bkorren@redhat.com>
See [1] for official reference. Instead of writing a static inventory script of hostnames, IPs and groupings Ansible allows writing a
wrote: script
to be run that produces that information dynamically.
Ah ok. I failed to realise that was in the Ansible context.
+1 from me as well. Could we also assign server roles/Ansible variable from the Lago YAML? Would we want to?
You could/can and that would depend on how we write the inventory script. Currently my script will parse out group assignments from the metadata. This would probably be clearer seeing the source code and an example. Would opening an issue with be best? Or a pull request with an example output to then decide where the script should live?
I'd say start with an issue. WRT to where will that live, would an output format plugin for 'Lago status' be a reasonable place for this?
Created https://github.com/lago-project/lago/issues/281 with some sample output, template info and the source code at the bottom for perusal. Eric
-- Barak Korren bkorren@redhat.com RHEV-CI Team

+1 from me as well. We are also thinking on moving existing bash deploy scripts we're using with ovirt-system-tests (running on Lago) with existing Ansible playbooks to install ovirt instead, though not sure its the same purpose as yours. On Wed, Jun 15, 2016 at 4:10 PM, Eric Helms <ehelms@redhat.com> wrote:
On Wed, Jun 15, 2016 at 8:53 AM, Barak Korren <bkorren@redhat.com> wrote:
On 15 June 2016 at 15:41, Eric Helms <ehelms@redhat.com> wrote:
On Wed, Jun 15, 2016 at 8:20 AM, Barak Korren <bkorren@redhat.com>
See [1] for official reference. Instead of writing a static
inventory
script of hostnames, IPs and groupings Ansible allows writing a
to be run that produces that information dynamically.
Ah ok. I failed to realise that was in the Ansible context.
+1 from me as well. Could we also assign server roles/Ansible variable from the Lago YAML? Would we want to?
You could/can and that would depend on how we write the inventory
wrote: script script.
Currently my script will parse out group assignments from the metadata. This would probably be clearer seeing the source code and an example. Would opening an issue with be best? Or a pull request with an example output to then decide where the script should live?
I'd say start with an issue. WRT to where will that live, would an output format plugin for 'Lago status' be a reasonable place for this?
Created https://github.com/lago-project/lago/issues/281 with some sample output, template info and the source code at the bottom for perusal.
Eric
-- Barak Korren bkorren@redhat.com RHEV-CI Team
_______________________________________________ lago-devel mailing list lago-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/lago-devel
-- Eyal Edri Associate Manager RHEV DevOps EMEA ENG Virtualization R&D Red Hat Israel phone: +972-9-7692018 irc: eedri (on #tlv #rhev-dev #rhev-integ)

On Wed, Jun 15, 2016 at 10:56 PM, Eyal Edri <eedri@redhat.com> wrote:
+1 from me as well. We are also thinking on moving existing bash deploy scripts we're using with ovirt-system-tests (running on Lago) with existing Ansible playbooks to install ovirt instead, though not sure its the same purpose as yours.
A bit more into the future - I don't think there's an immediate benefit to this right now - all provisioning is stable and should not have a lot of changes that we foresee. I do agree that once we have Ansible playbooks for installation (hosted-engine specifically), we may want to think of moving to use it - in order to exercise it. In addition, we may (some day) want to think of using it for the storage provisioning (although again right now it's good and solid). I'd like to add more services, and FreeIPA and Foreman+Katello are right on the list there - they should be probably be installed via Ansible already. Lastly, we need Gluster, which obviously should use gdeploy. My (incomplete) patch[1] does use it. Y. [1] https://gerrit.ovirt.org/#/c/57283/
On Wed, Jun 15, 2016 at 4:10 PM, Eric Helms <ehelms@redhat.com> wrote:
On Wed, Jun 15, 2016 at 8:53 AM, Barak Korren <bkorren@redhat.com> wrote:
On 15 June 2016 at 15:41, Eric Helms <ehelms@redhat.com> wrote:
On Wed, Jun 15, 2016 at 8:20 AM, Barak Korren <bkorren@redhat.com>
> > See [1] for official reference. Instead of writing a static
inventory
> script of hostnames, IPs and groupings Ansible allows writing a
> to > be run that produces that information dynamically. >
Ah ok. I failed to realise that was in the Ansible context.
+1 from me as well. Could we also assign server roles/Ansible variable from the Lago YAML? Would we want to?
You could/can and that would depend on how we write the inventory
Currently my script will parse out group assignments from the
wrote: script script. metadata. This
would probably be clearer seeing the source code and an example. Would opening an issue with be best? Or a pull request with an example output to then decide where the script should live?
I'd say start with an issue. WRT to where will that live, would an output format plugin for 'Lago status' be a reasonable place for this?
Created https://github.com/lago-project/lago/issues/281 with some sample output, template info and the source code at the bottom for perusal.
Eric
-- Barak Korren bkorren@redhat.com RHEV-CI Team
_______________________________________________ lago-devel mailing list lago-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/lago-devel
-- Eyal Edri Associate Manager RHEV DevOps EMEA ENG Virtualization R&D Red Hat Israel
phone: +972-9-7692018 irc: eedri (on #tlv #rhev-dev #rhev-integ)
_______________________________________________ lago-devel mailing list lago-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/lago-devel
participants (5)
-
Barak Korren
-
David Caro
-
Eric Helms
-
Eyal Edri
-
Yaniv Kaul