Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - hosts: all
- vars:
- output_dir: /opt
- tasks:
- - name: Create the mount point
- file:
- state: "directory"
- path: "{{ output_dir }}/dest"
- tags:
- - first
- - second
- - name: Create first directory to bind mount
- file:
- state: "directory"
- path: "{{ output_dir }}/src1"
- tags:
- - first
- - name: Create second directory to bind mount
- file:
- state: "directory"
- path: "{{ output_dir }}/src2"
- tags:
- - first
- - second
- - name: Mount first source
- mount:
- name: "{{ output_dir }}/dest"
- opts: bind
- src: "{{ output_dir }}/src1"
- fstype: None
- state: mounted
- tags:
- - first
- - name: Mount second source
- mount:
- name: "{{ output_dir }}/dest"
- opts: bind
- src: "{{ output_dir }}/src2"
- fstype: None
- state: mounted
- tags:
- - second
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement