Debian Codegraph @

test/integration/targets/blockinfile/tasks/diff.yml

raw
1 - name: Create a test file
2 copy:
3 content: diff test
4 dest: "{{ remote_tmp_dir_test }}/diff.txt"
5
6 - name: Add block to file with diff
7 blockinfile:
8 path: "{{ remote_tmp_dir_test }}/diff.txt"
9 block: |
10 line 1
11 line 2
12 register: difftest
13 diff: yes
14
15 - name: Ensure diff was shown
16 assert:
17 that:
18 - difftest.diff | length > 0