generated from russomi-labs/ansible-vm-lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook.yml
executable file
·56 lines (54 loc) · 1.38 KB
/
playbook.yml
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
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env ansible-playbook
---
- name: Play to test vagrant VM
hosts: all:!localhost
gather_facts: true
become: true
tasks:
- name: Forward Agent
copy:
dest: /home/vagrant/.ssh/config
content: "ForwardAgent yes"
owner: vagrant
group: vagrant
mode: 0600
- name: Print out operating system details
debug:
msg: >-
os_family:
{{ ansible_os_family }},
distro:
{{ ansible_distribution }}
{{ ansible_distribution_version }}
- name: Manage storage
hosts: all:!localhost
become: true
vars:
storage_safe_mode: false
tasks:
- name: Create three LVM logical volumes under volume group 'vg1' spread over four disks
include_role:
name: linux-system-roles.storage
vars:
storage_pools:
- name: vg1
type: lvm
disks:
- "/dev/sdb"
- "/dev/sdc"
- "/dev/sdd"
- "/dev/sde"
raid_level: "raid10"
state: present
volumes:
- name: lv1
size: "1g"
mount_point: "/opt/test1"
- name: lv2
size: "1g"
mount_point: "/opt/test2"
- name: lv3
size: "1g"
mount_point: "/opt/test3"
tags:
- storage