更新时间:2023-12-05 21:10:34
首先,您不使用 script
模块运行可执行文件,而是使用 command
或 shell
模块.
Firstly, you don't run an executable using script
module, but using a command
or shell
module.
其次,您应该利用 Ansible 事实.架构(uname -m
的结果)存储在 ansible_facts.architecture
事实中:
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