Cobbler inventory script should ignore hosts with `dns_name is None`, not just `dns_name == ''` #24546
Comments
movermeyer
added a commit
to movermeyer/ansible
that referenced
this issue
May 12, 2017
P.S: Can I ask why it is ignoring static interfaces anyway? It seems to me that static interfaces could be assigned DNS names. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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: