arongsoft 发表于 2018-7-30 11:53:54

ansible自动化工具部署实例

#看下使用的参数  
# ansible-doc -s synchronize
  
- name: Uses rsync to make synchronizing file paths in your playbooks quickand easy.
  
action: synchronize
  
archive                # 是否采用归档模式同步,即以源文件相同属性同步到目标地址
  
checksum               # 是否效验
  
compress               # 是否压缩
  
copy_links             # 同步的时候是否复制连接
  
delete               # 删除源中没有而目标存在的文件
  
dest=                  # 目标地址
  
dest_port            # 目标接受的端口
  
dirs                   # 以非递归的方式传输目录
  
existing_only          # Skipcreating new files on receiver.
  
group                  # Preservegroup
  
links                  # Copysymlinks as symlinks.
  
mode                   # 模式,rsync 同步的方式 PUSH\PULL
  
recursive            # 是否递归 yes/no
  
rsync_opts             # 使用rsync 的参数
  
rsync_path             # 服务的路径(源码编译时需指定)
  
rsync_timeout          # Specify a--timeout for the rsync command in seconds.
  
set_remote_user      # put user@for the remote paths. If you have a custom ssh config to define the remote userfor
  
src=                   # 源,同步的数据源
  
times
页: [1]
查看完整版本: ansible自动化工具部署实例