- name: Run a command under a non-Powershell interpreter (cmd in this case)
ansible.windows.
win_shell: echo %HOMEDIR%
args:
executable:
cmd
register: homedir_out
-----
That aside, following your precise example
- ansible.windows.win_shell: echo "HI"
--begin error
ERROR! this task 'ansible.windows.win_shell' has extra params, which is only allowed in the following modules: script, include, meta, include_role, raw, set_fact, win_shell, import_tasks, group_by, import_role, shell, include_vars, win_command, add_host, command, include_tasks
The error appears to be in '/etc/ansible/playbooks/shares/greenfield/greenfield_share_create.yml': line 294, column 5, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- ansible.windows.win_shell: echo "HI"
^ here
--end error
p.s, I hate google groups now.