You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/template/ansible_managed_79129.yml

30 lines
798 B
YAML

---
- 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"