mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
register: fail when invalid var name is specified (#56456)
This commit is contained in:
@@ -3,5 +3,4 @@
|
||||
set -eux
|
||||
|
||||
ansible-playbook test_templating_settings.yml -i ../../inventory -v "$@"
|
||||
ansible-playbook warn_on_register.yml -i ../../inventory -v "$@" 2>&1| grep 'is not templatable, but we found'
|
||||
[ "$(ansible-playbook dont_warn_register.yml -i ../../inventory -v "$@" 2>&1| grep -c 'is not templatable, but we found')" == "0" ]
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
- hosts: testhost
|
||||
gather_facts: false
|
||||
vars:
|
||||
thisshouldwarn: noreally
|
||||
tasks:
|
||||
- name: template in register warns
|
||||
debug: msg=unimportant
|
||||
register: '{{ thisshouldwarn }}'
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
- name: fetch pass_json
|
||||
uri: return_content=yes url=http://localhost:{{ http_port }}/{{ item }}.json
|
||||
register: pass
|
||||
register: fetch_pass_json
|
||||
with_sequence: start=0 end=4 format=pass%d
|
||||
|
||||
- name: check pass_json
|
||||
@@ -66,7 +66,7 @@
|
||||
- item.0.stat.checksum == item.1.content | checksum
|
||||
with_together:
|
||||
- "{{pass_checksum.results}}"
|
||||
- "{{pass.results}}"
|
||||
- "{{fetch_pass_json.results}}"
|
||||
|
||||
|
||||
- name: checksum fail_json
|
||||
|
||||
Reference in New Issue
Block a user