Created
December 22, 2014 05:50
-
-
Save qrtt1/19846df6e3013768a875 to your computer and use it in GitHub Desktop.
mount data disk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: mount data disk | |
mount: name=/opt src=/dev/sdc1 fstype=ext4 state=mounted | |
register: try_mount_disk | |
ignore_errors: True | |
- command: parted -s /dev/sdc mklabel gpt | |
when: try_mount_disk | failed | |
- command: parted -s /dev/sdc mkpart primary ext4 0 100% | |
when: try_mount_disk | failed | |
- command: mkfs.ext4 /dev/sdc1 | |
when: try_mount_disk | failed | |
- mount: name=/opt src=/dev/sdc1 fstype=ext4 state=mounted |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment