-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove trailing spaces in defaults/main.yml * replace with_subelements loop with loop keyword * add Molecule test for VG, VG+LV, VG+LV+FS, VG+LV+FS+MOUNT * add Molecule LVM mirror example/test * update README * add CHANGELOG
- Loading branch information
Showing
15 changed files
with
265 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Changelog | ||
--------- | ||
|
||
**0.2.0** | ||
|
||
- fix error when creating only a volume group without a logical volume | ||
- add Molecule test for VG, VG+LV, VG+LV+FS, VG+LV+FS+MOUNT | ||
- add Molecule LVM mirror example/test | ||
|
||
**0.1.1** | ||
|
||
- initial commit |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
# Copyright (C) 2021 Robert Wimmer | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
- hosts: test-lvm-ubuntu2004 | ||
vars_files: | ||
- vars/test-lvm-ubuntu2004_create.yml | ||
remote_user: vagrant | ||
become: true | ||
gather_facts: true | ||
tasks: | ||
- name: Include LVM role | ||
include_role: | ||
name: githubixx.lvm | ||
|
||
- hosts: test-lvm-ubuntu2004 | ||
vars_files: | ||
- vars/test-lvm-ubuntu2004_delete.yml | ||
remote_user: vagrant | ||
become: true | ||
gather_facts: true | ||
tasks: | ||
- name: Include LVM role | ||
include_role: | ||
name: githubixx.lvm |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
# Copyright (C) 2021 Robert Wimmer | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
dependency: | ||
name: galaxy | ||
|
||
driver: | ||
name: vagrant | ||
provider: | ||
name: libvirt | ||
type: libvirt | ||
options: | ||
memory: 192 | ||
cpus: 2 | ||
|
||
platforms: | ||
- name: test-lvm-ubuntu2004 | ||
box: generic/ubuntu2004 | ||
provider_raw_config_args: | ||
- "storage :file, :type => 'qcow2', :device => 'vdb', :size => '1G'" | ||
- "storage :file, :type => 'qcow2', :device => 'vdc', :size => '1G'" | ||
- "storage :file, :type => 'qcow2', :device => 'vdd', :size => '1G'" | ||
- "storage :file, :type => 'qcow2', :device => 'vde', :size => '1G'" | ||
interfaces: | ||
- auto_config: true | ||
network_name: private_network | ||
type: static | ||
ip: 192.168.10.10 | ||
|
||
provisioner: | ||
name: ansible | ||
connection_options: | ||
ansible_ssh_user: vagrant | ||
ansible_become: true | ||
log: true | ||
lint: yamllint . && flake8 && ansible-lint | ||
|
||
scenario: | ||
name: kvm-vg-only | ||
test_sequence: | ||
- prepare | ||
- converge | ||
|
||
verifier: | ||
name: ansible | ||
enabled: False |
39 changes: 39 additions & 0 deletions
39
molecule/kvm-debian-20-only/vars/test-lvm-ubuntu2004_create.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
# Copyright (C) 2021 Robert Wimmer | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
lvm_vgs: | ||
- vgname: test-vg-01 | ||
pvs: /dev/vdb | ||
state: present | ||
- vgname: test-vg-02 | ||
pvs: /dev/vdc | ||
state: present | ||
lvm_lvs: | ||
- lvname: test-lv-02 | ||
size: 10%VG | ||
state: present | ||
- vgname: test-vg-03 | ||
pvs: /dev/vdd | ||
state: present | ||
lvm_lvs: | ||
- lvname: test-lv-03 | ||
size: 10%VG | ||
state: present | ||
fs: | ||
type: ext4 | ||
state: present | ||
- vgname: test-vg-04 | ||
pvs: /dev/vde | ||
state: present | ||
lvm_lvs: | ||
- lvname: test-lv-04 | ||
size: 10%VG | ||
state: present | ||
fs: | ||
type: ext4 | ||
state: present | ||
mountpoint: | ||
state: mounted | ||
path: | ||
name: /mnt1 |
48 changes: 48 additions & 0 deletions
48
molecule/kvm-debian-20-only/vars/test-lvm-ubuntu2004_delete.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
# Copyright (C) 2021 Robert Wimmer | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
lvm_vgs: | ||
- vgname: test-vg-01 | ||
pvs: /dev/vdb | ||
state: absent | ||
force: true | ||
- vgname: test-vg-02 | ||
pvs: /dev/vdc | ||
state: absent | ||
force: true | ||
lvm_lvs: | ||
- lvname: test-lv-02 | ||
size: 10%VG | ||
state: absent | ||
force: true | ||
- vgname: test-vg-03 | ||
pvs: /dev/vdd | ||
state: absent | ||
force: true | ||
lvm_lvs: | ||
- lvname: test-lv-03 | ||
size: 10%VG | ||
state: absent | ||
force: true | ||
fs: | ||
type: ext4 | ||
state: absent | ||
force: true | ||
- vgname: test-vg-04 | ||
pvs: /dev/vde | ||
state: absent | ||
force: true | ||
lvm_lvs: | ||
- lvname: test-lv-04 | ||
size: 10%VG | ||
state: absent | ||
force: true | ||
fs: | ||
type: ext4 | ||
state: absent | ||
force: true | ||
mountpoint: | ||
state: unmounted | ||
path: | ||
name: /mnt1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
# Copyright (C) 2021 Robert Wimmer | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
- hosts: test-lvm-ubuntu2004 | ||
vars_files: | ||
- vars/test-lvm-ubuntu2004_create.yml | ||
remote_user: vagrant | ||
become: true | ||
gather_facts: true | ||
tasks: | ||
- name: Include LVM role | ||
include_role: | ||
name: githubixx.lvm |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
# Copyright (C) 2021 Robert Wimmer | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
dependency: | ||
name: galaxy | ||
|
||
driver: | ||
name: vagrant | ||
provider: | ||
name: libvirt | ||
type: libvirt | ||
options: | ||
memory: 192 | ||
cpus: 2 | ||
|
||
platforms: | ||
- name: test-lvm-ubuntu2004 | ||
box: generic/ubuntu2004 | ||
provider_raw_config_args: | ||
- "storage :file, :type => 'qcow2', :device => 'vdb', :size => '1G'" | ||
- "storage :file, :type => 'qcow2', :device => 'vdc', :size => '1G'" | ||
interfaces: | ||
- auto_config: true | ||
network_name: private_network | ||
type: static | ||
ip: 192.168.10.10 | ||
|
||
provisioner: | ||
name: ansible | ||
connection_options: | ||
ansible_ssh_user: vagrant | ||
ansible_become: true | ||
log: true | ||
lint: yamllint . && flake8 && ansible-lint | ||
|
||
scenario: | ||
name: kvm-lvm-mirror | ||
test_sequence: | ||
- prepare | ||
- converge | ||
|
||
verifier: | ||
name: ansible | ||
enabled: False |
17 changes: 17 additions & 0 deletions
17
molecule/kvm-lvm-mirror/vars/test-lvm-ubuntu2004_create.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
# Copyright (C) 2021 Robert Wimmer | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
lvm_vgs: | ||
- vgname: vg01 | ||
pvs: /dev/vdb,/dev/vdc | ||
state: present | ||
lvm_lvs: | ||
- lvname: lv_mirror | ||
size: 100M | ||
state: present | ||
opts: --type raid1 | ||
fs: | ||
type: ext4 | ||
opts: -L lv_mirror | ||
state: present |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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