首页 > 其他 > 详细

Ansible 模块使用

时间:2018-04-15 10:35:56      阅读:183      评论:0      收藏:0      [点我收藏+]

 

- hosts: woshi129
  tasks:
    - name: copy /etc
      copy:
        src: "{{ item }}"
        dest: /root/ooo/
      with_fileglob:
        - /data/ppp/*
    - name: combine
      command: echo "msg={{ item.0 }} and {{ item.1 }}"
      with_together:
        - [1,2,3]
        - [a,b]

 

 with_fileglob:  将文件下所有的文件作为变量传输,但不是递归。

 with_together: 列表组合形式传输变量

Ansible 模块使用

原文:https://www.cnblogs.com/huangjinbin/p/8836646.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!