summaryrefslogtreecommitdiff
path: root/test/integration/targets/lineinfile/tasks/test_string01.yml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/lineinfile/tasks/test_string01.yml')
-rw-r--r--test/integration/targets/lineinfile/tasks/test_string01.yml26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/integration/targets/lineinfile/tasks/test_string01.yml b/test/integration/targets/lineinfile/tasks/test_string01.yml
index 6e0c12c3af..b86cd09acd 100644
--- a/test/integration/targets/lineinfile/tasks/test_string01.yml
+++ b/test/integration/targets/lineinfile/tasks/test_string01.yml
@@ -5,7 +5,7 @@
- name: deploy the test file for lineinfile string
copy:
src: teststring.txt
- dest: "{{ output_dir }}/teststring.txt"
+ dest: "{{ remote_tmp_dir }}/teststring.txt"
register: result
- name: assert that the test file was deployed
@@ -17,7 +17,7 @@
- name: insert a line at the beginning of the file, and back it up
lineinfile:
- dest: "{{ output_dir }}/teststring.txt"
+ dest: "{{ remote_tmp_dir }}/teststring.txt"
state: present
line: "New line at the beginning"
insertbefore: "BOF"
@@ -26,7 +26,7 @@
- name: insert a line at the beginning of the file again
lineinfile:
- dest: "{{ output_dir }}/teststring.txt"
+ dest: "{{ remote_tmp_dir }}/teststring.txt"
state: present
line: "New line at the beginning"
insertbefore: "BOF"
@@ -34,7 +34,7 @@
- name: Replace a line using string
lineinfile:
- dest: "{{ output_dir }}/teststring.txt"
+ dest: "{{ remote_tmp_dir }}/teststring.txt"
state: present
line: "Thi$ i^ [ine 3"
search_string: (\\w)(\\s+)([\\.,])
@@ -42,13 +42,13 @@
- name: Replace a line again using string
lineinfile:
- dest: "{{ output_dir }}/teststring.txt"
+ dest: "{{ remote_tmp_dir }}/teststring.txt"
state: present
line: "Thi$ i^ [ine 3"
search_string: (\\w)(\\s+)([\\.,])
register: backrefs_result2
-- command: cat {{ output_dir }}/teststring.txt
+- command: cat {{ remote_tmp_dir }}/teststring.txt
- name: assert that the line with backrefs was changed
assert:
@@ -59,7 +59,7 @@
- name: stat the test after the backref line was replaced
stat:
- path: "{{ output_dir }}/teststring.txt"
+ path: "{{ remote_tmp_dir }}/teststring.txt"
register: result
- name: assert test checksum matches after backref line was replaced
@@ -69,7 +69,7 @@
- name: remove the middle line using string
lineinfile:
- dest: "{{ output_dir }}/teststring.txt"
+ dest: "{{ remote_tmp_dir }}/teststring.txt"
state: absent
search_string: "Thi$ i^ [ine 3"
register: result
@@ -82,7 +82,7 @@
- name: stat the test after the middle line was removed
stat:
- path: "{{ output_dir }}/teststring.txt"
+ path: "{{ remote_tmp_dir }}/teststring.txt"
register: result
- name: assert test checksum matches after the middle line was removed
@@ -92,7 +92,7 @@
- name: run a validation script that succeeds using string
lineinfile:
- dest: "{{ output_dir }}/teststring.txt"
+ dest: "{{ remote_tmp_dir }}/teststring.txt"
state: absent
search_string: <FilesMatch ".py[45]?$">
validate: "true %s"
@@ -106,7 +106,7 @@
- name: stat the test after the validation succeeded
stat:
- path: "{{ output_dir }}/teststring.txt"
+ path: "{{ remote_tmp_dir }}/teststring.txt"
register: result
- name: assert test checksum matches after the validation succeeded
@@ -116,7 +116,7 @@
- name: run a validation script that fails using string
lineinfile:
- dest: "{{ output_dir }}/teststring.txt"
+ dest: "{{ remote_tmp_dir }}/teststring.txt"
state: absent
search_string: "This is line 1"
validate: "/bin/false %s"
@@ -130,7 +130,7 @@
- name: stat the test after the validation failed
stat:
- path: "{{ output_dir }}/teststring.txt"
+ path: "{{ remote_tmp_dir }}/teststring.txt"
register: result
- name: assert test checksum matches the previous after the validation failed