在目标机器上运行脚本有以下两种方式:
1. - name: run the script from the control machine directly.
script: "{{path_to_scripts}}/script.sh"
2. - name: Copying the script from target machine.
copy: src="{{path_to_scripts}}/script.sh" dest="{{path_to_scripts}}/script.sh" mode=0777
- name: Execute script locally.
command: /bin/sh {{path_to_scripts}}/script.sh
当我针对 30 多台目标机器运行剧本时。我想知道哪一个会是更好的选择?
如果我更喜欢一个而不是另一个,那么性能损失是多少?