XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Ansible dynamic inventory

    Scheduled Pinned Locked Moved Xen Orchestra
    2 Posts 2 Posters 634 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      d1rtym0nk3y
      last edited by d1rtym0nk3y

      I'm exploring using xo-lib to build a dynamic inventory for ansible.
      Looks like it should be pretty simple, to get a list of hosts, with ip's if they agents installed and leverage tags and/or custom fields for host vars

      But whats missing, is a way to create group vars cleanly. I can group servers using tags, like ansible_group:web but i can't see a way to create vars for that group without repeating them on every host.

      If anyone has tackled this issue i'd love to hear how you approached it.
      And i guess maybe theres a Feature Request here - Create VM Groups, where Groups can have tags attached. If we had that, then an Ansible Inventory Plugin would be a simple bolt on 🙂

      EDIT -
      Just to add, i've seen this https://github.com/vtsingaras/xenorchestra_inventory/blob/master/xenorchestra.py
      and i'm aware there was a question back in July about ansible inventory that got no replies so maybe theres not a lot of love for dynamic inv here 🙂 Or maybe people are using other inv management tools... love to know what

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        We sponsored someone to work on Terraform and Packer. But every contribution is welcome, on Ansible too 🙂

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post