zoukankan      html  css  js  c++  java
  • ansible upload

    # 链接地址:https://www.cnblogs.com/xiaoxiaoleo/p/6626299.html
    # synchronize: 从拉取远程服务器文件,需要加mode: pull
    # unarchive: 解压远程服务器文件,需要加copy: no
    ---
    - hosts: notfontserver
      tasks:
      - name: 在没有字体的主机上,安装fontconfig服务
        yum: name=fontconfig state=latest
    
    - hosts: notfontserver
      tasks:
      - name: 将本机字体打包文件(/home/yutang/fonts.tar.gz)传输到没有字体的主机
        synchronize:
          src: /home/yutang/fonts.tar.gz
          dest: /usr/share/fonts.tar.gz
    
    - hosts: notfontserver
      tasks:
      - name: 解压远程主机的打包文件,禁止复制
        unarchive: 
          src: /usr/share/fonts.tar.gz
          dest: /usr/share/
          copy: no
    
    - hosts: notfontserver
      tasks:
      - name: 刷新字体库
        shell:  fc-list
    
  • 相关阅读:
    第二章例2-9
    第二章例2-8
    第二章例2-7
    第二章例2-6
    第二章例2-5
    第二章例2-4
    第二章例2-3
    第二章例2-2
    第二章例2-1
    第一章例1-2
  • 原文地址:https://www.cnblogs.com/ipyanthony/p/9995546.html
Copyright © 2011-2022 走看看