Project

General

Profile

Actions

Bug #35116

open

hammer ansible role sync command only syncs when a role name is given

Added by Ron Lavi almost 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2026381

Description of problem:
hammer ansible role sync command only syncs when a role name is given

Version-Release number of selected component (if applicable):
- Satellite 6.10.1

How reproducible:
- When the variables are re-imported via GUI the default variable is updated with the correct text
- The command "hammer ansible variables update --id xxxx" however does not update the default in Satellite

Steps to Reproduce:
1. Create example playbook
- An empty role with just this in the defaults/main.yml file:

---
aaxc.test.input: "Default Text"

2. import the role to Satellite
3. import vartiables to Satellite
4. The aaxc.test.input variable is now shown in Configure => Ansible Variables with a string of "Default Text"
5. Change the text in the defaults/main.yml file to something else
6. Run: # hammer ansible role sync --proxy-id 1 --role-names aaxc.test
7. A task "Import roles And Variables" is created an the new variable is synced correctly
8. Change the text in the defaults/main.yml file to something else again
9. Run: # hammer ansible role sync --proxy-id 1

Actual results:
- The commands exits with message "A task to Sync Ansible Roles was created."
- No task is created to import all variables for all roles.
- If nrun with debug the command shows

[DEBUG 2021-11-24T15:03:46 API] Response: {
"message" => "No changes detected in specified Ansible Roles and their variables"
}

Expected results:
- To allow a CI to import and update the variables the hammer command should properly sync all roles
when no specific role is given with --role-names

Additional info:

No data to display

Actions

Also available in: Atom PDF