summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/blockinfile/tasks/validate.yml
blob: aa7aa63626dff83256bf65bba3387831a4d6b99b (plain)
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: EXPECTED FAILURE test improper validate
  blockinfile:
    path: "{{ remote_tmp_dir }}/validate.txt"
    block: |
      line1
      line2
    create: yes
    validate: grep
  ignore_errors: yes

- name: EXPECTED FAILURE test failure to validate
  blockinfile:
    path: "{{ remote_tmp_dir }}/validate.txt"
    block: |
      line1
      line2
    create: yes
    validate: grep line47 %s
  ignore_errors: yes

- name: Test proper validate
  blockinfile:
    path: "{{ remote_tmp_dir }}/validate.txt"
    block: |
      line1
      line2
    create: yes
    validate: grep line1 %s