Uploaded image for project: 'Puppet Task Runner'
  1. Puppet Task Runner
  2. BOLT-942

I want to add a node to a group in inventory and use the groups transport config

    Details

    • Type: Story
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: BOLT 1.4.0
    • Component/s: None
    • Labels:
    • Release Notes:
      New Feature
    • Release Notes Summary:
      A new `add_to_group` function allows `Target`s to be added to an inventory group during plan execution.
    • QA Risk Assessment:
      Needs Assessment

      Description

      If I'm creating or discovering nodes I may have partial connection information (port/user/password/private_key) before the plan starts but not know the hostname or ip address. I should be able to add these nodes to a group in inventory after discovering or creating them and pick up the config in the inventory of that group. This may include adding an inventory data type to run these functions on. For now, the simplest solution is to create a new plan function on the target object which adds the node to an inventory group. This should merge the node config with the inventory config, following the precedence laid out in this ticket.

      $target.add_to_group($group)

      This should raise an error if the user tries to add a target to a group that does not exist.
      This should do nothing if the user adds the target to a group it is already a part of.

      User story: I have my EC2 credentials in the inventory, and want to add an ephemeral node to that group to use the EC2 credentials from the group within a plan

      Questions

      • Should adding a node to a group always recompute/update it's config? Yes, the config should be retained by the node within the scope of the plan
      • Data precedence: URI > Inventory Config (Following inventory precedence rules) > CLI > Bolt config > Default

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                cas.donoghue Cas Donoghue
                Reporter:
                alex Alex Dreyer
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: