Demo entry 6861141

송향근

   

Submitted by anonymous on Aug 06, 2019 at 17:39
Language: YAML. Code size: 543 Bytes.

---
- name: make file test
  hosts: centos7
  become_user: user
  vars:
    byepath: ~/bye
  tasks:
    - name: make hello directory
      file: path=~/hello state=directory
    - name: make test1~100 in hello directory
      file: 
        path: "~/hello/{{ item }}"
        state: touch
      with_items:
      - test1.txt
      - test2.txt
      - test3.txt
    - name: make bye directory
      file: path=~/bye state=directory
    - name: copy Vagrantfile in bye directory
      copy: src=Vagrantfile dest={{ byepath }}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).