File: template_test.yml

package info (click to toggle)
python-mitogen 0.3.36-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,708 kB
  • sloc: python: 24,457; sh: 198; makefile: 74; perl: 19; ansic: 18
file content (28 lines) | stat: -rw-r--r-- 768 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
- name: regression/template_test.yml
  # Ansible's template module has been seen to raise mitogen.core.StreamError
  # iif  there is a with_items loop and the destination path has an extension
  hosts: test-targets
  gather_facts: false
  become: false
  vars:
    foos:
      - dest: /tmp/foo
      - dest: /tmp/foo.txt
    foo: Foo
    bar: Bar
  tasks:
    - block:
        - name: Template files
          template:
            src: foo.bar.j2
            dest: "{{ item.dest }}"
            mode: u=rw,go=r
          # This has to be with_items, loop: doesn't trigger the bug
          with_items: "{{ foos }}"

      always:
        - name: Cleanup
          file:
            path: "{{ item.dest }}"
            state: absent
          with_items: "{{ foos }}"