mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
parent
07bb7e5a3b
commit
af0d8cda7b
4 changed files with 102 additions and 46 deletions
|
@ -168,3 +168,23 @@
|
|||
assert:
|
||||
that:
|
||||
- "shell_result4.changed == False"
|
||||
|
||||
- name: execute a shell command using a literal multiline block
|
||||
shell: |
|
||||
echo this is a
|
||||
"multiline echo"
|
||||
"with a new line
|
||||
in quotes"
|
||||
| md5sum
|
||||
| tr -s ' '
|
||||
| cut -f1 -d ' '
|
||||
register: shell_result5
|
||||
|
||||
- debug: var=shell_result5
|
||||
|
||||
- name: assert the multiline shell command ran as expected
|
||||
assert:
|
||||
that:
|
||||
- "shell_result5.changed"
|
||||
- "shell_result5.stdout == '32f3cc201b69ed8afa3902b80f554ca8'"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue