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

Unable to Import Inventory File in AWX Operator #1926

Open
6 of 11 tasks
j551n-ncloud opened this issue Jul 23, 2024 · 1 comment
Open
6 of 11 tasks

Unable to Import Inventory File in AWX Operator #1926

j551n-ncloud opened this issue Jul 23, 2024 · 1 comment
Labels

Comments

@j551n-ncloud
Copy link

j551n-ncloud commented Jul 23, 2024

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

I am encountering an issue with importing an inventory file in the AWX Operator. The inventory file is in INI format, but it fails to parse correctly, leading to errors during the inventory import process. Specifically Children Groups

AWX version

2.19.1

Select the relevant components

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

Installation method

kubernetes

Modifications

no

Ansible version

AWX EE (24.6.1)

Operating system

Debian 12

Web browser

Firefox

Steps to reproduce

ini1
server_hw:

ini

[hw_servers]

admin01 client=group1 software=True homes=False backup=True automounts=True bondmaster="bond0" bondslaves="['eth0', 'eth1']" ib=True
admin02 client=group1 software=True homes=False backup=True automounts=True bondmaster="bond0" bondslaves="['eth2', 'eth3']"

srv02 software=True homes=False backup=True automounts=True bondmaster="bond0" bondslaves="['eth0', 'eth1']"
srv05 client=group1 bondmaster="bond0" bondslaves="['eth0','eth1']" backup=True software=False
srv06 client=group1 bondmaster="bond0" bondslaves="['eth4','eth5']" ib=True automounts=True software=True homes=False

srv10 client=group1 backup=True software=False

srv17 bondslaves="['eth0', 'eth1']" bondmaster="bond0"
srv18 bondslaves="['eth0', 'eth1']" bondmaster="bond0"

sm01 ib=True release="" bondmaster="bond0" bondslaves="['eth4', 'eth5']" client=group1

test01 client="" bondmaster="bond0" bondslaves="['eth2', 'eth3']" ib=True release="" automounts=True homes=False cluster=True
test02 client="" bondmaster="bond0" bondslaves="['eth2', 'eth3']" ib=True release="" automounts=True homes=False cluster=True
test03 client="" bondmaster="bond0" bondslaves="['eth2', 'eth3']" ib=True release="" automounts=True homes=False cluster=True
test04 client="" bondmaster="bond0" bondslaves="['eth2', 'eth3']" ib=True release="" automounts=True homes=False cluster=True
test05 client="" bondmaster="bond0" bondslaves="['eth2', 'eth3']" ib=True release="" automounts=True homes=False cluster=True
test06 client="" bondmaster="bond0" bondslaves="['eth2', 'eth3']" ib=True release="" automounts=True homes=False cluster=True

build01 ib=False homes=True release="" client=group1 software=True backup=True

srv04 release="" backup=True ib=False bondmaster="bond0" bondslaves="['eth2','eth3']" client=group1

dragen release="" backup=False ib=False bondmaster="bond0" bondslaves="['eth6','eth7']" client=group1 automounts=True

gpu01 bondmaster="bond0" bondslaves="['eth8', 'eth9']" users="['users', 'group2']" automounts=False

[hw_servers:vars]
software=False
static_ip=True

ini 2
server_vm:

ini

[vm_servers]

vm100 client=group1 ib=False container=True

vm101 ib=False backup=True users="['user', 'guide']" client=group1 automounts=True

vm102 client=group1 ib=False container=True backup=True

vm103 client=group1 ib=False container=True backup=True

vm106 ib=False
vm107 ib=False

vm108 client=group1 users="['user', 'otrs']" backup=True software=False

vm113 client=group1 users="['user', 'otrs']" mail="[email protected]"

vm114 ib=False backup=False

vm115 ib=False backup=False

vm116 ib=False backup=True

vm117 ib=False backup=True users="['user', 'guide']" client=group1 automounts=True
vm136 ib=False backup=False users="['user', 'guide']" client=group1 automounts=True

vm118 ib=False backup=True client=group1

vm119 ib=False backup=True container=True client=group1

vm121 backup=True client=group1 software=True release="" dev_packages=True
vm137 backup=True client=group1 software=True dev_packages=True

vm122 ib=False backup=True client=group1 software=False automounts=False users="['user', 'otp']"

vm123 ib=False backup=False client=group1 users="['user', 'otrs']" software=True

vm125 backup=True client=group1 users="['group']" automounts=True software=True

vm126 backup=True client=group1
vm145 backup=True client=group1

vm127 automounts=True homes=True nfsmounts="[]" skip_nfsmounts=True client=group1 backup=True users="['user', 'linker']"

vm129 homes=True client=group1 ib=False backup=True
vm130 automounts=True homes=True client=group1 ib=False backup=False

vm138 ib=False backup=True client=group1 software=False automounts=False auth_keys="['key']"

vm140 homes=True backup=True

vm141 homes=True backup=False
vm144 homes=True backup=False

vm142
vm143
vm112

vm128

vm146 backup=True client=group1
vm148 backup=True client=group1
vm149 backup=True client=group1

vm147 backup=True homes=True client=group1
vm151 backup=True homes=True client=group1

vm150 homes=True backup=True client=group1

otp-ws1 client=group1 backup=True software=True automounts=True users="['user', 'otp']"
otp-ws2 client=group1 backup=True software=True automounts=True users="['user', 'otp']"
otp-lb client=group1 backup=True users="['user', 'lb']"

dmz01 homes=True client=group1 backup=True users="['user', 'dmz']"
dmz02 homes=True client=group1 backup=True users="['user', 'dmz']"

[vm_servers:vars]
software=False
skip_nfsmounts=True
ib=False

[transfer_servers]
vm104 client=group1 ib=False users="['group', 'transfer']" automounts=True

[transfer_servers:vars]
software=False
skip_nfsmounts=True
ib=False

[docker]
vm107 docker_user="user"

ini 3
server_all:

ini

[servers:children]
hw_servers
fileservers
vm_servers
transfer_servers

[servers:vars]
homes=True

Expected results

Importet

Actual results

[WARNING]: * Failed to parse /runner/project/02-servers-all with yaml plugin:
We were unable to read either as JSON nor YAML, these are the errors we got
from each: JSON: Expecting value: line 1 column 1 (char 0) Syntax Error while
loading YAML. did not find expected The error appears to be
in '/runner/project/02-servers-all': line 6, column 1, but may be elsewhere in
the file depending on the exact syntax problem. The offending line appears to
be: [servers:children] hw_servers ^ here
File "/usr/local/lib/python3.9/site-packages/ansible/inventory/manager.py", line 293, in parse_source
plugin.parse(self._inventory, self._loader, source, cache=cache)
File "/usr/local/lib/python3.9/site-packages/ansible/plugins/inventory/yaml.py", line 107, in parse
raise AnsibleParserError(e)
[WARNING]: * Failed to parse /runner/project/02-servers-all with ini plugin:
/runner/project/02-servers-all:6: Section [servers:children] includes undefined
group: hw_servers
File "/usr/local/lib/python3.9/site-packages/ansible/inventory/manager.py", line 293, in parse_source
plugin.parse(self._inventory, self._loader, source, cache=cache)
File "/usr/local/lib/python3.9/site-packages/ansible/plugins/inventory/ini.py", line 137, in parse
raise AnsibleParserError(e)
[WARNING]: Unable to parse /runner/project/02-servers-all as an inventory
source

Additional information

No response

@github-actions github-actions bot added needs_triage type:bug Something isn't working community labels Jul 23, 2024
@djyasin djyasin transferred this issue from ansible/awx Jul 24, 2024
@djyasin
Copy link
Member

djyasin commented Jul 24, 2024

Hello @j551n-ncloud , this issue seems to be related to AWX Operator, so we have transferred it accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants