我正在使用ansible
在本地Docker容器上执行某些任务,例如:
hosts: name-of-docker-container
connection: docker
tasks:
- name: setting up ssh_config
template:
src: ssh_config.j2
dest: /home/user/.ssh/ssh_config
mode: "0600"
owner: user
group: user
像这样简单的事情需要2-5秒钟才能运行。这不应该少于一秒钟吗?如何使ansible运行更快?我尝试过pipelining
,但似乎无济于事:
ansible-playbook -v -e 'pipelining=True' -i inventories/staging/hosts.yml staging-deploy.yml