Cobbler inventory script should ignore hosts with dns_name is None
, not just dns_name == ''
#24546
Labels
affects_2.3
This issue/PR affects Ansible v2.3
bug
This issue/PR relates to a bug.
c:inventory/contrib_script
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
CONFIGURATION
No changes to
ansible.cfg
OS / ENVIRONMENT
N/A
SUMMARY
The Cobbler inventory script discards hosts that have the empty string for a DNS name, but not those that fail to set the
dns_name
variable at all (ie. leave it asNone
).STEPS TO REPRODUCE
Create a system in cobbler with a single static interface and no DNS name.
Then run cobbler.py
EXPECTED RESULTS
The host with no DNS name would also be ignored, as claimed at the top of cobbler.py.
ACTUAL RESULTS
When called implicitly as part of any ansible command, cobbler.py returns a JSON object with a
null
hostnameWhich causes Ansible to fail when it tries to load the inventory:
There's a check for
dns_name == ''
, but there should also be a check fordns_name is None
The text was updated successfully, but these errors were encountered: