Add a test and changelog for non-string host names in yaml inventory files (#77569)

pull/77507/head
Sloane Hertel 3 years ago committed by GitHub
parent 9280396e19
commit 4faa576ee9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- yaml inventory plugin - fix the error message for non-string hostnames (https://github.com/ansible/ansible/issues/77519).

@ -2,3 +2,5 @@
# handle empty/commented out group keys correctly https://github.com/ansible/ansible/issues/47254 # handle empty/commented out group keys correctly https://github.com/ansible/ansible/issues/47254
ANSIBLE_VERBOSITY=0 diff -w <(ansible-inventory -i ./test.yml --list) success.json ANSIBLE_VERBOSITY=0 diff -w <(ansible-inventory -i ./test.yml --list) success.json
ansible-inventory -i ./test_int_hostname.yml --list 2>&1 | grep 'Host pattern 1234 must be a string'

@ -0,0 +1,5 @@
all:
children:
kids:
hosts:
1234: {}
Loading…
Cancel
Save