无聊的IT

导航

1-8 ansible playbook inclue使用

 

(jiankong_venv) [yy1s@rbtnode1 playbook]$ cat touchf1.yml 
---
- name: create file 1
  shell: touch /tmp/file1.txt
  tags:
     - cfile1
     - cfile3

  

 

(jiankong_venv) [yy1s@rbtnode1 playbook]$ cat touchf2.yml  
---
- name: create file 2
  shell: "touch /tmp/file2.txt"
  tags: 
    - cfile2

 

(jiankong_venv) [yy1s@rbtnode1 playbook]$ cat f15.yml 
---
- hosts : 144.131.252.252
  remote_user : root
  tasks:
      - include_tasks: touchf1.yml
      - include_tasks: touchf2.yml

 

posted on 2019-02-13 13:39  秦寒  阅读(69)  评论(0)    收藏  举报