daily pastebin goal
68%
SHARE
TWEET

Untitled

a guest Sep 12th, 2018 113 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ---
  2. - hosts: all
  3.   tasks:
  4.   - name: create partitions for vdb and vdc
  5.     parted:
  6.       device: "{{ item }}"
  7.       number: 1
  8.       state: present
  9.     loop:
  10.       - /dev/vdb
  11.       - /dev/vdc
  12.   - name: format vdb and vdc
  13.     filesystem:
  14.       fstype: ext4
  15.       dev: "{{ item }}"
  16.     loop:
  17.       - /dev/vdb
  18.       - /dev/vdc
  19.   - name: mount vdb to /data1 and vdc to /data2
  20.     mount:
  21.       fstype: ext4
  22.       src: "{{ item.dev }}"
  23.       path: "{{ item.path }}"
  24.       state: mounted
  25.     loop:
  26.       - { dev: '/dev/vdb', path: '/data1' }
  27.       - { dev: '/dev/vdc', path: '/data2' }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top