diff --git a/test.yml b/test.yml index d864bbc..f07165d 100644 --- a/test.yml +++ b/test.yml @@ -1,4 +1,23 @@ +--- - hosts: synology gather_facts: false tasks: - - raw: "echo SHELL=$0; which sh || true; ls -l /bin/sh || true; test -x /bin/sh && echo OK || echo KO" \ No newline at end of file + - name: Inspect shell env on Synology + ansible.builtin.raw: | + echo "WHOAMI=$(whoami 2>/dev/null || true)" + echo "SHELL0=$0" + echo "PATH=$PATH" + echo "which_sh=$(command -v sh 2>/dev/null || true)" + echo "ls_/bin/sh=$(ls -l /bin/sh 2>/dev/null || true)" + echo "ls_/bin/busybox=$(ls -l /bin/busybox 2>/dev/null || true)" + echo "which_busybox=$(command -v busybox 2>/dev/null || true)" + echo "test_builtin=$(test 1 -eq 1 && echo OK || echo KO)" + echo "bracket_cmd=$(command -v '[' 2>/dev/null || true)" + register: shinfo + changed_when: false + + - debug: + var: shinfo.stdout_lines + + - debug: + var: shinfo.stderr_lines