为什么与本地docker连接的ans这么慢?

时间:2019-01-15 11:22:14

标签: docker ansible

我正在使用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

0 个答案:

没有答案