简单的问题。
我在路径~/setup/inventory.py
的远程节点上有一个Python3脚本,并且我试图远程执行它。
因此,我看了一下script
资源,该资源正在本地计算机上搜索脚本。
如何使Ansible运行我的远程 Python3脚本。通常执行它看起来像os python3 /setup/inventory.py ansible vscode bash
答案 0 :(得分:0)
根据您的情况使用command
或shell
模块。
类似
- name: execute my script
command: python3 /setup/inventory.py ansible vscode bash