mirror of https://github.com/ansible/ansible.git
* inspect components, ansible_managed templatable
fixes #82322
(cherry picked from commit 124d03145c
)
pull/83226/head
parent
59c5f776b6
commit
40bdb2b471
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- ansible_managed restored it's 'templatability' by ensuring the possible injection routes are cut off earlier in the process.
|
@ -1,29 +0,0 @@
|
||||
---
|
||||
- hosts: testhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- set_fact:
|
||||
output_dir: "{{ lookup('env', 'OUTPUT_DIR') }}"
|
||||
|
||||
- name: check strftime
|
||||
block:
|
||||
- template:
|
||||
src: "templates/%necho Onii-chan help Im stuck;exit 1%n.j2"
|
||||
dest: "{{ output_dir }}/79129-strftime.sh"
|
||||
mode: '0755'
|
||||
|
||||
- shell: "exec {{ output_dir | quote }}/79129-strftime.sh"
|
||||
|
||||
- name: check jinja template
|
||||
block:
|
||||
- template:
|
||||
src: !unsafe "templates/completely{{ 1 % 0 }} safe template.j2"
|
||||
dest: "{{ output_dir }}/79129-jinja.sh"
|
||||
mode: '0755'
|
||||
|
||||
- shell: "exec {{ output_dir | quote }}/79129-jinja.sh"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "'Hello' in result.stdout"
|
@ -0,0 +1,2 @@
|
||||
[defaults]
|
||||
ansible_managed=ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}({{{{q('pipe', 'uname -a')}}}})
|
Loading…
Reference in New Issue