From 59de8ce827717e2f4c3bb9dfafae1f5f5f212a42 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Mon, 4 Dec 2023 16:55:31 -0600 Subject: [PATCH] fix authorized_key tests Signed-off-by: Adam Miller --- tests/integration/targets/authorized_key/tasks/comments.yml | 2 +- tests/integration/targets/authorized_key/tasks/ssh_dss.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/targets/authorized_key/tasks/comments.yml b/tests/integration/targets/authorized_key/tasks/comments.yml index 222607d..5947c31 100644 --- a/tests/integration/targets/authorized_key/tasks/comments.yml +++ b/tests/integration/targets/authorized_key/tasks/comments.yml @@ -20,7 +20,7 @@ register: result - name: Get the file content - ansible.builtin.command: /bin/cat "{{ output_dir | expanduser }}/authorized_keys" | fgrep DATA_BASIC + ansible.builtin.shell: set -o pipefail && cat "{{ output_dir | expanduser }}/authorized_keys" | fgrep DATA_BASIC changed_when: false register: content diff --git a/tests/integration/targets/authorized_key/tasks/ssh_dss.yml b/tests/integration/targets/authorized_key/tasks/ssh_dss.yml index c766163..610d3ca 100644 --- a/tests/integration/targets/authorized_key/tasks/ssh_dss.yml +++ b/tests/integration/targets/authorized_key/tasks/ssh_dss.yml @@ -240,7 +240,7 @@ - result.key_options == "no-agent-forwarding,no-X11-forwarding,permitopen=\"10.9.8.1:8080\",permitopen=\"10.9.8.1:9001\"" - name: Get the file content - ansible.builtin.command: /bin/cat "{{ output_dir | expanduser }}/authorized_keys" | fgrep DATA_BASIC + ansible.builtin.shell: set -o pipefail && cat "{{ output_dir | expanduser }}/authorized_keys" | fgrep DATA_BASIC changed_when: false register: content