Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-35140

"hammer hostgroup ansible-roles assign" command overwrites existing roles instead of appending

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Undefined Undefined
    • None
    • 6.15.z
    • Hammer
    • None
    • False
    • sat-rocket
    • None
    • None
    • None
    • None

      Description of problem:
      ----------------------

      When running the following command, the specified role is correctly assigned, but all previously assigned Ansible roles are removed. The command appears to overwrite the entire list of roles instead of appending to it - 

          # hammer hostgroup ansible-roles assign --title "$TITLE" --ansible-role-ids "$ANSIBLE_ROLE_ID"

       

      How reproducible:
      ----------------

      Always

       

      Steps to Reproduce:
      ------------------

      1. Assign multiple Ansible roles to a host group via Web UI or CLI.

      2. Run the hammer hostgroup ansible-roles assign command with a single role.

      3. Observe that previous roles are no longer assigned to the host group.

       

      Actual behavior:
      [Describe the issue in detail, including what is happening and where]
      ---------------------------------------------------------------------'

      All roles previously assigned to the host group are erased and replaced with the newly specified role.

       

      Expected behavior:
      [Describe what should be happening instead]
      -------------------------------------------

      The command is expected to add the new role to the existing list of assigned roles on the host group, or at least provide an option to do so.

       

      Business Impact / Additional info:
      ---------------------------------

      • Customer has not encountered this issue when assigning roles via the Satellite WebUI. It seems to work as expected there.
      • No error message is received when the command is launched from the cli.

              Unassigned Unassigned
              rhn-support-ajambhul Anand Jambhulkar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: