Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (25 sloc) 675 Bytes
# Author: jmutkawoa@gmail.com
# This playbook is to create a VG and LV as well as to format the dist to ext4 and mount the disk on specific directory.
---
- hosts: ansible2
user: root
tasks:
- name: vgcreate
lvg:
vg: vgdata
pvs: /dev/sdc1
- name: lvcreate
lvol:
vg: vgdata
lv: lvdisk
size: 500M
- name: create file system
filesystem:
fstype: ext4
dev: /dev/vgdata/lvdisk
- name: mount logical volume
mount:
name: /disk
src: /dev/vgdata/lvdisk
fstype: ext4
state: mounted
You can’t perform that action at this time.