dynamic inventory not working properly

Original post https://github.com/ansible/ansible/issues/26574#####