【发布时间】:2021-09-02 11:16:10
【问题描述】:
我想知道是否可以使用ansible 的community.general.make 模块在ansible 中传递以下命令:
make -C safenet install PREFIX=~/.local
我必须使用params,如here 所述吗?例如
- name: installing safenet
community.general.make:
chdir: ~/myfiles/safenet
target: install
params:
- "-C"
- PREFIX=~/.local
编辑:这是我得到的输出。
TASK [Installing safenet] *******************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "argument 'params' is of type <class 'list'> and we were unable to convert to dict: <class 'list'> cannot be converted to a dict"}
【问题讨论】:
-
尝试时会发生什么?
-
请看我更新的答案。