This commit is contained in:
parent
c45d193af4
commit
9b28f1f5d9
5 changed files with 22 additions and 1 deletions
2
changelogs/fragments/66764-host-pattern-warning.yml
Normal file
2
changelogs/fragments/66764-host-pattern-warning.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- Fix incorrect "Could not match supplied host pattern" warning (https://github.com/ansible/ansible/issues/66764)
|
|
@ -53,7 +53,7 @@ class Play(Base, Taggable, CollectionSearch):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# =================================================================================
|
# =================================================================================
|
||||||
_hosts = FieldAttribute(isa='list', required=True, listof=string_types, always_post_validate=True)
|
_hosts = FieldAttribute(isa='list', required=True, listof=string_types, always_post_validate=True, priority=-1)
|
||||||
|
|
||||||
# Facts
|
# Facts
|
||||||
_gather_facts = FieldAttribute(isa='bool', default=None, always_post_validate=True)
|
_gather_facts = FieldAttribute(isa='bool', default=None, always_post_validate=True)
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
- hosts: localhost
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- name: Group
|
||||||
|
group_by:
|
||||||
|
key: test_{{ inventory_hostname }}
|
||||||
|
|
||||||
|
- hosts: test_localhost
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- name: Print
|
||||||
|
import_tasks: tasks.yml
|
|
@ -0,0 +1,3 @@
|
||||||
|
- name: test
|
||||||
|
debug:
|
||||||
|
msg: hello
|
|
@ -108,3 +108,6 @@ ansible-playbook valid_include_keywords/playbook.yml "$@"
|
||||||
# https://github.com/ansible/ansible/issues/64902
|
# https://github.com/ansible/ansible/issues/64902
|
||||||
ansible-playbook tasks/test_allow_single_role_dup.yml 2>&1 | tee test_allow_single_role_dup.out
|
ansible-playbook tasks/test_allow_single_role_dup.yml 2>&1 | tee test_allow_single_role_dup.out
|
||||||
test "$(grep -c 'ok=3' test_allow_single_role_dup.out)" = 1
|
test "$(grep -c 'ok=3' test_allow_single_role_dup.out)" = 1
|
||||||
|
|
||||||
|
# https://github.com/ansible/ansible/issues/66764
|
||||||
|
ANSIBLE_HOST_PATTERN_MISMATCH=error ansible-playbook empty_group_warning/playbook.yml
|
||||||
|
|
Loading…
Reference in a new issue