Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using Role module #310

Open
nodje opened this issue Sep 12, 2023 · 1 comment
Open

Error using Role module #310

nodje opened this issue Sep 12, 2023 · 1 comment
Labels
bug Something isn't working inactive

Comments

@nodje
Copy link

nodje commented Sep 12, 2023

Using 2.0.2, I get the following error:

TASK [infra.ah_configuration.role : Add Automation Hub role] *********************************************************************************************************************************************************************************************
[WARNING]: TASK: infra.ah_configuration.role : Add Automation Hub role: The loop variable '__role' is already in use. You should set the `loop_var` value in the `loop_control` option for the task to something else to avoid variable collisions and
unexpected behavior.
fatal: [localhost]: FAILED! => {"msg": "The field 'tags' has an invalid value, which includes an undefined variable. The error was: 'dict object' has no attribute 'tags'. 'dict object' has no attribute 'tags'\n\nThe error appears to be in '/root/.ansible/collections/ansible_collections/infra/ah_configuration/roles/role/tasks/main.yml': line 4, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n# Create AH Role\n- name: Add Automation Hub role\n  ^ here\n"}

With the following config:

---
ah_configuration_dispatcher_roles:
  - {role: group, var: ah_groups, tags: groups}
  - {role: user, var: ah_users, tags: users}
  - {role: role, var: ah_roles, tags: roles}
...

---
ah_roles:
  - name: galaxy.DBA
    description: DBA role
    perms:
      - modify_ansible_repo_content
      - sign_ansiblerepository
...
@nodje nodje added bug Something isn't working new labels Sep 12, 2023
@sean-m-sullivan
Copy link
Contributor

This looks to be something in dispatch and the role, why is it asking about tags... will have to look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working inactive
Projects
None yet
Development

No branches or pull requests

3 participants