summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/blockinfile
diff options
context:
space:
mode:
authorBrian Coca <bcoca@users.noreply.github.com>2020-11-09 20:45:09 +0100
committerGitHub <noreply@github.com>2020-11-09 20:45:09 +0100
commita1730af91f94552e8aaff4bedfb8dcae00bd284d (patch)
tree419be8ec7228755d54fc828bd22df191e32d096f /test/integration/targets/blockinfile
parent[ansible-test] use newer container images (#72126) (diff)
downloadansible-a1730af91f94552e8aaff4bedfb8dcae00bd284d.tar.xz
ansible-a1730af91f94552e8aaff4bedfb8dcae00bd284d.zip
Ensure blockinfile correctly returns backupfile (#72544)
* Ensure blockinfile correctly returns backupfile Fixes #27626 based on #27859 Co-authored-by: Giovanni Sciortino (@giovannisciortino)
Diffstat (limited to 'test/integration/targets/blockinfile')
-rw-r--r--test/integration/targets/blockinfile/tasks/add_block_to_existing_file.yml5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/integration/targets/blockinfile/tasks/add_block_to_existing_file.yml b/test/integration/targets/blockinfile/tasks/add_block_to_existing_file.yml
index dbb93ecce3..7093ed2b99 100644
--- a/test/integration/targets/blockinfile/tasks/add_block_to_existing_file.yml
+++ b/test/integration/targets/blockinfile/tasks/add_block_to_existing_file.yml
@@ -12,6 +12,11 @@
backup: yes
register: blockinfile_test0
+- name: ensure we have a bcackup file
+ assert:
+ that:
+ - "'backup_file' in blockinfile_test0"
+
- name: check content
shell: 'grep -c -e "Match User ansible-agent" -e "PasswordAuthentication no" {{ output_dir_test }}/sshd_config'
register: blockinfile_test0_grep