Skip to content

Instantly share code, notes, and snippets.

@andry1
Created January 23, 2015 01:30
Show Gist options
  • Save andry1/c63161d1ba671babfb7d to your computer and use it in GitHub Desktop.
Save andry1/c63161d1ba671babfb7d to your computer and use it in GitHub Desktop.
---
- hosts: druid
sudo: yes
tasks:
- name: Create partitions
command: /sbin/parted --script /dev/{{ item }} mklabel gpt
command: /sbin/parted --script /dev/{{ item }} mkpart primary 0% 100%
with_items:
- sda
- sdb
- sdc
- sdd
- name: Create filesystems
filesystem: fstype=ext4 dev=/dev/{{ item }}1
with_items:
- sda
- sdb
- sdc
- sdd
- name: Mount filesystems
mount: name=/druid_{{ item }} src=/dev/{{ item }}1 fstype=ext4 state=mounted opts=noatime
with_items:
- sda
- sdb
- sdc
- sdd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment