mountpartition.yml
1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
- hosts: vdc-disk
become: true
tasks:
- name: "Mount up \"{{ item.device }}\" to \"{{ item.path }}\""
mount:
state: mounted
fstype: ext4
src: "{{ item.device }}"
path: "{{ item.path }}"
with_items:
- { device: /dev/vdc1, path: /opt }
- { device: /dev/vdc2, path: /upload }
- { device: /dev/vdc3, path: /archive }
- { device: /dev/vdc4, path: /data }
- hosts: sdb-disk
become: true
tasks:
- name: "Mount up \"{{ item.device }}\" to \"{{ item.path }}\""
mount:
state: mounted
fstype: ext4
src: "{{ item.device }}"
path: "{{ item.path }}"
with_items:
- { device: /dev/sdb1, path: /opt }
- { device: /dev/sdb2, path: /upload }
- { device: /dev/sdb3, path: /archive }
- { device: /dev/sdb4, path: /data }
- hosts: vdb-disk
become: true
tasks:
- name: "Mount up \"{{ item.device }}\" to \"{{ item.path }}\""
mount:
state: mounted
fstype: ext4
src: "{{ item.device }}"
path: "{{ item.path }}"
with_items:
- { device: /dev/vdb1, path: /opt }
- { device: /dev/vdb2, path: /upload }
- { device: /dev/vdb3, path: /archive }
- { device: /dev/vdb4, path: /data }