爱若晨风 发表于 2018-7-30 06:36:03

ansible--循环

# vim c1.yml  

  
#练习循环with_items
  
---
  
- name: create file
  
   hosts: web
  
   gather_facts: false
  
   tasks:
  
    - name: running
  
      file: path=/tmp/{{ item }} state=touch mode=0644 owner=wang group=wang
  
      with_items:
  
      - test
  
      - lianxi
  
      - hello
  
# ansible-playbook c1.yml
页: [1]
查看完整版本: ansible--循环