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/blockinfile/tasks/validate.yml

29 lines
589 B
YAML

- 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