mirror of https://github.com/ansible/ansible.git
various mod_args fixes (#60290)
* various mod_args fixes * filter task keywords when parsing actions from task_ds- prevents repeatedly banging on the pluginloader for things we know aren't modules/actions * clean up module/action error messaging. Death to `no action in task!`- actually list the candidate modules/actions from the task if present. * remove shadowed_module test * previous discussion was that this behavior isn't worth the complexity or performance costs in mod_args * fix/add test, remove module shadow logic * address review feedbackpull/60466/head
parent
9efa00e762
commit
a40baf22fa
@ -0,0 +1,2 @@
|
|||||||
|
minor_changes:
|
||||||
|
- changed task module/action parsing to report more helpful errors
|
||||||
@ -1 +0,0 @@
|
|||||||
shippable/posix/group3
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
gather_facts: false
|
|
||||||
tasks:
|
|
||||||
- command: whoami
|
|
||||||
tags: foo
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
gather_facts: false
|
|
||||||
tasks:
|
|
||||||
- debug:
|
|
||||||
msg: "{{ lookup('vars', 'inventory_hostname') }}"
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -ux
|
|
||||||
|
|
||||||
OUT=$(ansible-playbook playbook.yml -i inventory -e @../../integration_config.yml "$@" 2>&1 | grep 'ERROR! Module "tags" shadows the name of a reserved keyword.')
|
|
||||||
|
|
||||||
if [[ -z "$OUT" ]]; then
|
|
||||||
echo "Fake tags module did not cause error"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# This playbook calls a lookup which shadows a keyword.
|
|
||||||
# This is an ok situation, and should not error
|
|
||||||
ansible-playbook playbook_lookup.yml -i ../../inventory -e @../../integration_config.yml "$@"
|
|
||||||
Loading…
Reference in New Issue