issue #426: fix low_level_execute_command.yml breakage.

issue510
David Wilson 6 years ago
parent a6e6bc4c71
commit bd82fa1986

@ -14,8 +14,8 @@
assert: assert:
that: that:
- 'raw.rc == 0' - 'raw.rc == 0'
- 'raw.stdout_lines[-1].decode() == "2"' - 'raw.stdout_lines[-1]|to_text == "2"'
- 'raw.stdout[-1].decode() == "2"' - 'raw.stdout[-1]|to_text == "2"'
- name: Run raw module with sudo - name: Run raw module with sudo
become: true become: true
@ -29,10 +29,10 @@
- raw.rc == 0 - raw.rc == 0
# WHY DOES VANILLA INSERT NEWLINES HERE!?!?!?!?!?!ONE # WHY DOES VANILLA INSERT NEWLINES HERE!?!?!?!?!?!ONE
#- raw.stdout in ("\r\nroot\r\n", "root\r\n") #- raw.stdout in ("\r\nroot\r\n", "root\r\n")
- 'raw.stdout.decode().endswith("root\r\n")' - '(raw.stdout|to_text).endswith("root\r\n")'
- | - |
raw.stdout_lines in ( raw.stdout_lines|to_text in (
["\r\n".encode()], ["\r\n"],
["root\r\n".encode()], ["root\r\n"],
["root".encode()], ["root"],
) )

Loading…
Cancel
Save