ansible/test/integration/targets/blockinfile/tasks/validate.yml

29 lines
577 B
YAML
Raw Normal View History

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