Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

alg-5_pulladdons.yaml

  • 脚本内容

    - hosts: test
      vars:
        project_path: /home/ubuntu/qin-server
      tasks:
        - name: pull addons directory
          synchronize:
            src: "/home/ubuntu/mf_algo_node_prod/addons/"
            dest: "/home/ubuntu/pkg/addons/"
            mode: pull
    
  • syncchronize模块

    • 用于增量传输文件,比copy高效
    • mode为pull表示从目标拉取,这里只对test组(仅有单台机器)的hosts生效