Advertisement
jtyr

Untitled

Feb 14th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.99 KB | None | 0 0
  1. ---
  2.  
  3. - hosts: all
  4.   vars:
  5.     output_dir: /opt
  6.   tasks:
  7.     - name: Create the mount point
  8.       file:
  9.         state: "directory"
  10.         path: "{{ output_dir }}/dest"
  11.       tags:
  12.        - first
  13.         - second
  14.  
  15.     - name: Create first directory to bind mount
  16.       file:
  17.         state: "directory"
  18.         path: "{{ output_dir }}/src1"
  19.       tags:
  20.        - first
  21.  
  22.     - name: Create second directory to bind mount
  23.       file:
  24.         state: "directory"
  25.         path: "{{ output_dir }}/src2"
  26.       tags:
  27.        - first
  28.         - second
  29.  
  30.     - name: Mount first source
  31.       mount:
  32.         name: "{{ output_dir }}/dest"
  33.         opts: bind
  34.         src: "{{ output_dir }}/src1"
  35.         fstype: None
  36.         state: mounted
  37.       tags:
  38.        - first
  39.  
  40.     - name: Mount second source
  41.       mount:
  42.         name: "{{ output_dir }}/dest"
  43.         opts: bind
  44.         src: "{{ output_dir }}/src2"
  45.         fstype: None
  46.         state: mounted
  47.       tags:
  48.        - second
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement