I want to run this command:
setarch $(uname -m) --uname-2.6 /opt/files/IBM/ITM/install.sh -q -h /opt/files/IBM/ITM/Install -p /opt/files/silent_install.txt
in Ansible using the script module but I'm not sure how to incorporate the extra args.
Firstly, you don't run an executable using script module, but using a command or shell module.
Secondly, you should utilise Ansible facts for that. The architecture (the result of uname -m) is stored in the ansible_facts.architecture fact:
command: setarch {{ ansible_facts.architecture }} --uname-2.6 /opt/files/IBM/ITM/install.sh -q -h /opt/files/IBM/ITM/Install -p /opt/files/silent_install.txt
See the examples here; just type them in.
# Example from Ansible Playbooks
- script: /some/local/script.sh --some-arguments 1234
...but I recommend using copy or template with command or shell as techraf suggests.