Open Thulium-Drake opened 10 months ago
Not inactive, still would like a reply :)
Was able to recreate the issue. This happens when you're applying roles to a group that does not exist.
add this to your hub config before you create group roles
- name: Include group role
ansible.builtin.include_role:
name: infra.ah_configuration.group
And to your vars
ah_groups:
- name: ee_publisher
As explicit is better than implicit, what should actually happen is that the group should fail to create from group_roles
Yes this is a known issue
Good to know, I have updated my playbooks to also include making the group first, so the error is gone, but I still feel it should be addressed somewhere in the role as well. Either by just failing, or going the implicit route and still succeeding at the first go.
Summary
Creating a group with
group_roles
fails, but the group is still created succesfullyIssue Type
Ansible, Collection, Private Automation Hub details
OS / ENVIRONMENT
Debian 12
Desired Behavior
Create a group and continue the play
Actual Behavior
Creates a group and fails task
Please give some details of what is actually happening. Include a [minimum complete verifiable example] with:
Run the below config/playbook once, it breaks with the error above. However, when you check in the WebUI, the group is actually created. Running the playbook twice will actually set up the user with that group and it has all permissions that are configured.
name: 'Sync collections into Automation Hub from Galaxy and RH AH' hosts: 'ansible_automation_hub' tasks:
name: 'Ensure ee_publisher group' ansible.builtin.import_role: name: 'infra.ah_configuration.group_roles'
name: 'Ensure ansible user' ansible.builtin.import_role: name: 'infra.ah_configuration.user'
ah_group_roles: