gitlab.yml
1.53 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
- name: Create Folder Structure
file:
path: "{{ item.path }}"
owner: "{{ item.owner }}"
group: "{{ item.owner }}"
state: directory
with_items:
- { owner: root, path: /opt/gitlab/config }
- { owner: root, path: /opt/gitlab/log }
- { owner: root, path: /opt/gitlab/data }
- name: Create Partiton "{{ app_disk }}"
parted:
device: "{{ item.device }}"
number: "{{ item.number }}"
part_end: "{{ item.end }}"
part_start: "{{ item.start }}"
state: present
# part_type: logical
with_items:
- { device: "{{ app_disk }}", number: "1", start: "0%", end: "25%" }
- { device: "{{ app_disk }}", number: "2", start: "26%", end: "50%" }
- { device: "{{ app_disk }}", number: "3", start: "51%", end: "100%" }
- name: "Format Partiton: \"{{ item.device }}\" using etx4"
filesystem:
dev: "{{ item.device }}"
fstype: ext4
with_items:
- { device: "{{ app_disk }}1" }
- { device: "{{ app_disk }}2" }
- { device: "{{ app_disk }}3" }
- name: "Mount Partiton \"{{ item.device }}\" to \"{{ item.path }}\""
mount:
state: mounted
fstype: ext4
src: "{{ item.device }}"
path: "{{ item.path }}"
with_items:
- { device: "{{ app_disk }}1", path: /opt/gitlab }
- { device: "{{ app_disk }}2", path: /opt/gitlab/log }
- { device: "{{ app_disk }}3", path: /opt/gitlab/data }