Skip to content

gitlab inventory group_vars not loading satellite groups #16102

@mboeker

Description

@mboeker

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.
  • I am NOT reporting a (potential) security vulnerability. (These should be emailed to [email protected] instead.)

Bug Summary

This is my gitlab setup:
inventory/group_vars/all.yml
inventory/group_vars/home.yml

In Satellite, I have a group called 'home'
This group contains server 'server1.home.local'

I created a playbook that outputs all groups a server is in, and outputs a variable defined in all.yml, and a variable defined in home.yml.

TASK [Gathering Facts] *********************************************************
task path: /runner/project/playbooks/_testing.yml:6
ok: [server1.home.local]

TASK [Check connection] *************
task path: /runner/project/playbooks/_testing.yml:10
ok: [server1.home.local] => {"changed": false, "ping": "pong"}

TASK [Show groups] *************************************************************
task path: /runner/project/playbooks/_testing.yml:14
ok: [server1.home.local] => (item=home) => {
    "msg": "Found group: home"
}

TASK [debug all vars] *******************************************************
task path: /runner/project/playbooks/_testing.yml:19
ok: [server1.home.local] => {
    "msg": "Timezone: Europe/Vienna"
}

TASK [debug home vars] *******************************************************
task path: /runner/project/playbooks/_testing.yml:24
fatal: [server1.home.local]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ntp_server' is undefined. 'ntp_server' is undefined\n\nThe error appears to be in '/runner/project/playbooks/_testing.yml': line 24, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n  - name: debug home vars\n    ^ here\n"}
...ignoring

PLAY RECAP *********************************************************************
server1.home.local          : ok=5    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=1   

This host is not in the gitlab inventory, it is only in the Satellite inventory.
Timezone is defined in all.yml, ntp_server is defined in home.yml.
You can see it loads group_vars/all.yml, but it is not loading group_vars/home.yml.

AWX version

24.6.1

Select the relevant components

  • UI
  • UI (tech preview)
  • API
  • Docs
  • Collection
  • CLI
  • Other

Installation method

kubernetes

Modifications

no

Ansible version

No response

Operating system

RHEL 9.6

Web browser

Edge

Steps to reproduce

Deploy AWX
Link it to a gitlab project with various group_vars
Link it to a Satellite with hosts and group names matching group_vars
Define things in group_vars/all.yml
Define things in group_vars/GROUPNAME.yml

Vars from all.yml are loaded, GROUPNAME.yml are not loaded.

Expected results

AWX should load the variables corresponding to the group names the server identifies (in my example "home")

Actual results

Only group_vars/all.yml is loaded, group_vars/GROUPNAME.yml is not read

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions