I'm trying to run a script on my Ansible localhost. What I have now is:
- name: "Cherrytree - execute build.sh"
ansible.builtin.shell: "./build.sh"
args:
chdir: /opt/Build/cherrytree
When I run this I get the error:
ERROR! this task 'ansible.builtin.shell' has extra params, which is only allowed in the following modules: win_shell, import_tasks, add_host, meta, script, include_tasks, import_role, shell, win_command, raw, group_by, include_vars, include_role.
I'm just trying to run a script that will install cherrytree using Ansible. Any help would be appreciated.
shell:still works fine both ways, you'll be better off using the old styleshell:since it will work for the foreseeable future. Pedantically, you don't needshell:for that, either, since you're not using any "shell" features, thecommand:task is designed for things one canexec