Commit 25390001 by ansible

no message

1 parent 593f32a5
Showing with 23 additions and 14 deletions
- name: Remove all partitions from disk
parted:
device: /dev/sdb
state: info
register: sdb_info
# Remove all partitions from disk
parted:
device: "/dev/{{ app_disk }}"
number: "{{ item.num }}"
state: absent
with_items:
- "{{ sdb_info.partitions }}"
- name: Create New Partiton "/dev/{{ app_disk }}" - name: Create New Partiton "/dev/{{ app_disk }}"
parted: parted:
device: "{{ item.device }}" device: "{{ item.device }}"
...@@ -25,3 +11,25 @@ ...@@ -25,3 +11,25 @@
- { device: "/dev/{{ app_disk }}", number: "2", start: "41%", end: "80%" } - { device: "/dev/{{ app_disk }}", number: "2", start: "41%", end: "80%" }
- { device: "/dev/{{ app_disk }}", number: "3", start: "81%", end: "90%" } - { device: "/dev/{{ app_disk }}", number: "3", start: "81%", end: "90%" }
- { device: "/dev/{{ app_disk }}", number: "4", start: "91%", end: "100%" } - { device: "/dev/{{ app_disk }}", number: "4", start: "91%", end: "100%" }
- name: "Format disk: \"{{ item.device }}\" using etx4"
filesystem:
dev: "{{ item.device }}"
fstype: ext4
with_items:
- { device: "/dev/{{ app_disk }}"1 }
- { device: "/dev/{{ app_disk }}"2 }
- { device: "/dev/{{ app_disk }}"3 }
- { device: "/dev/{{ app_disk }}"4 }
- name: "Mount up \"{{ item.device }}\" to \"{{ item.path }}\""
mount:
state: mounted
fstype: ext4
src: "{{ item.device }}"
path: "{{ item.path }}"
with_items:
- { device: "/dev/{{ app_disk }}"1, path: /opt }
- { device: "/dev/{{ app_disk }}"2, path: /upload }
- { device: "/dev/{{ app_disk }}"3, path: /archive }
- { device: "/dev/{{ app_disk }}"4, path: /data }
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!