Skip to content

Commit

Permalink
0.3.0 (#4)
Browse files Browse the repository at this point in the history
* min_ansible_version variable value should be string / versions should be string in meta/main.yml

* use FQN Ansible module names / fix Jinja2 spacing

* update (c) year

* add Github release action to push new release to Ansible Galaxy

* update CHANGELOG

* molecule: add prepare.yml

* molecule: add vars/test-lvm-minimal.yml with some minimal LVM variables enough to test core functionality

* remove support for Fedora 33 + 34 / add support for Fedora 35 + 36 / remove support for opensuse 15.2 / add support for opensuse 15.3 / add support for Ubuntu 22.04

* remove opensuse 15.4 from meta/main.yml

* tasks/main.yml: use fully qualified Ansible module names

* update kvm Molecule test scenario

* rename kvm-debian-20-only -> kvm-ubuntu-20-only

* update Molecule scenario kvm-lvm-mirror

* update Molecule scenario kvm-ubuntu-20-only

* update CHANGELOG
  • Loading branch information
githubixx authored Sep 13, 2022
1 parent a0a9852 commit 579552d
Show file tree
Hide file tree
Showing 31 changed files with 271 additions and 109 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
# Copyright (C) 2021-2022 Robert Wimmer
# SPDX-License-Identifier: GPL-3.0-or-later
#
# This workflow requires a GALAXY_API_KEY secret present in the GitHub
# repository or organization.
#
# See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy
# See: https://github.com/ansible/galaxy/issues/46

name: Release
on:
push:
tags:
- '*'

defaults:
run:
working-directory: 'githubixx.lvm'

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v2
with:
path: 'githubixx.lvm'

- name: Set up Python 3.
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install Ansible.
run: pip3 install ansible-core

- name: Trigger a new import on Galaxy.
run: >-
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
$(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
Changelog
---------

**0.3.0**

- fix various `ansible-lint` issues
- update Molecule scenario `kvm-ubuntu-20-only`
- update Molecule scenario `kvm-lvm-mirror`
- update Molecule scenario `kvm`
- `tasks/main.yml`: use fully qualified Ansible module names
- remove support for Fedora 33 + 34
- add support for Fedora 35 + 36
- remove support for opensuse 15.2
- add support for opensuse 15.3
- add support for Ubuntu 22.04
- molecule: add `vars/test-lvm-minimal.yml` with some minimal LVM variables enough to test core functionality
- add Github release action to push new release to Ansible Galaxy
- `min_ansible_version` variable value should be string / versions should be string in `meta/main.yml`

**0.2.0**

- fix error when creating only a volume group without a logical volume
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (C) 2021 Robert Wimmer
Copyright (C) 2021-2022 Robert Wimmer
SPDX-License-Identifier: GPL-3.0-or-later
-->

Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# Copyright (C) 2021 Robert Wimmer
# Copyright (C) 2021-2022 Robert Wimmer
# SPDX-License-Identifier: GPL-3.0-or-later

# By default no LVM resources are created. See examples below.
Expand Down
23 changes: 12 additions & 11 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
---
# Copyright (C) 2021 Robert Wimmer
# Copyright (C) 2021-2022 Robert Wimmer
# SPDX-License-Identifier: GPL-3.0-or-later

galaxy_info:
author: Robert Wimmer
description: Manage Linux Logical Volume Manager resources
license: GPLv3
min_ansible_version: 2.9
min_ansible_version: "2.9"
role_name: lvm
namespace: githubixx
platforms:
- name: ArchLinux
- name: Ubuntu
versions:
- bionic
- focal
- "bionic"
- "focal"
- "jammy"
- name: Debian
versions:
- buster
- bullseye
- "buster"
- "bullseye"
- name: EL
versions:
- 7
- 8
- "7"
- "8"
- name: Fedora
versions:
- 33
- 34
- "35"
- "36"
- name: opensuse
versions:
- 15.2
- "15.3"
galaxy_tags:
- linux
- lvm
Expand Down
4 changes: 2 additions & 2 deletions molecule/kvm-lvm-mirror/converge.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
# Copyright (C) 2021 Robert Wimmer
# Copyright (C) 2021-2022 Robert Wimmer
# SPDX-License-Identifier: GPL-3.0-or-later

- hosts: test-lvm-ubuntu2004
vars_files:
- vars/test-lvm-ubuntu2004_create.yml
- vars/test-lvm-ubuntu2004_create.yml
remote_user: vagrant
become: true
gather_facts: true
Expand Down
9 changes: 4 additions & 5 deletions molecule/kvm-lvm-mirror/molecule.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# Copyright (C) 2021 Robert Wimmer
# Copyright (C) 2021-2022 Robert Wimmer
# SPDX-License-Identifier: GPL-3.0-or-later

dependency:
Expand All @@ -10,13 +10,12 @@ driver:
provider:
name: libvirt
type: libvirt
options:
memory: 192
cpus: 2

platforms:
- name: test-lvm-ubuntu2004
box: generic/ubuntu2004
memory: 1024
cpus: 2
provider_raw_config_args:
- "storage :file, :type => 'qcow2', :device => 'vdb', :size => '1G'"
- "storage :file, :type => 'qcow2', :device => 'vdc', :size => '1G'"
Expand All @@ -42,4 +41,4 @@ scenario:

verifier:
name: ansible
enabled: False
enabled: false
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# Copyright (C) 2021 Robert Wimmer
# Copyright (C) 2021-2022 Robert Wimmer
# SPDX-License-Identifier: GPL-3.0-or-later

lvm_vgs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
# Copyright (C) 2021 Robert Wimmer
# Copyright (C) 2021-2022 Robert Wimmer
# SPDX-License-Identifier: GPL-3.0-or-later

- hosts: test-lvm-ubuntu2004
vars_files:
- vars/test-lvm-ubuntu2004_create.yml
- vars/test-lvm-ubuntu2004_create.yml
remote_user: vagrant
become: true
gather_facts: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# Copyright (C) 2021 Robert Wimmer
# Copyright (C) 2021-2022 Robert Wimmer
# SPDX-License-Identifier: GPL-3.0-or-later

dependency:
Expand All @@ -10,13 +10,12 @@ driver:
provider:
name: libvirt
type: libvirt
options:
memory: 192
cpus: 2

platforms:
- name: test-lvm-ubuntu2004
box: generic/ubuntu2004
memory: 1024
cpus: 2
provider_raw_config_args:
- "storage :file, :type => 'qcow2', :device => 'vdb', :size => '1G'"
- "storage :file, :type => 'qcow2', :device => 'vdc', :size => '1G'"
Expand All @@ -37,11 +36,11 @@ provisioner:
lint: yamllint . && flake8 && ansible-lint

scenario:
name: kvm-vg-only
name: kvm-ubuntu-20-only
test_sequence:
- prepare
- converge

verifier:
name: ansible
enabled: False
enabled: false
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# Copyright (C) 2021 Robert Wimmer
# Copyright (C) 2021-2022 Robert Wimmer
# SPDX-License-Identifier: GPL-3.0-or-later

lvm_vgs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# Copyright (C) 2021 Robert Wimmer
# Copyright (C) 2021-2022 Robert Wimmer
# SPDX-License-Identifier: GPL-3.0-or-later

lvm_vgs:
Expand Down
62 changes: 32 additions & 30 deletions molecule/kvm/converge.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,21 @@
---
# Copyright (C) 2021 Robert Wimmer
# Copyright (C) 2021-2022 Robert Wimmer
# SPDX-License-Identifier: GPL-3.0-or-later

- hosts: all
- hosts: test-lvm-ubuntu2204
vars_files:
- vars/test-lvm-minimal.yml
remote_user: vagrant
become: true
gather_facts: true
tasks:
- block:
- name: (Archlinux) Init pacman
raw: |
pacman-key --init
pacman-key --populate archlinux
changed_when: false
ignore_errors: true

- name: (Archlinux) Update pacman cache
community.general.pacman:
update_cache: yes
changed_when: false
when: ansible_distribution|lower == 'archlinux'

- name: (Ubuntu) Update APT package cache
apt:
update_cache: "true"
cache_valid_time: 3600
when: ansible_distribution|lower == 'ubuntu'
- name: Include LVM role
include_role:
name: githubixx.lvm

- hosts: test-lvm-ubuntu2004
vars_files:
- vars/test-lvm-ubuntu2004_create.yml
- vars/test-lvm-ubuntu2004_create.yml
remote_user: vagrant
become: true
gather_facts: true
Expand All @@ -39,6 +25,8 @@
name: githubixx.lvm

- hosts: test-lvm-ubuntu1804
vars_files:
- vars/test-lvm-minimal.yml
remote_user: vagrant
become: true
gather_facts: true
Expand All @@ -48,6 +36,8 @@
name: githubixx.lvm

- hosts: test-lvm-debian10
vars_files:
- vars/test-lvm-minimal.yml
remote_user: vagrant
become: true
gather_facts: true
Expand All @@ -56,7 +46,9 @@
include_role:
name: githubixx.lvm

- hosts: test-lvm-fedora33
- hosts: test-lvm-fedora35
vars_files:
- vars/test-lvm-minimal.yml
remote_user: vagrant
become: true
gather_facts: true
Expand All @@ -65,7 +57,9 @@
include_role:
name: githubixx.lvm

- hosts: test-lvm-fedora34
- hosts: test-lvm-fedora36
vars_files:
- vars/test-lvm-minimal.yml
remote_user: vagrant
become: true
gather_facts: true
Expand All @@ -74,7 +68,9 @@
include_role:
name: githubixx.lvm

- hosts: test-lvm-centos8
- hosts: test-lvm-centos7
vars_files:
- vars/test-lvm-minimal.yml
remote_user: vagrant
become: true
gather_facts: true
Expand All @@ -83,7 +79,9 @@
include_role:
name: githubixx.lvm

- hosts: test-lvm-centos7
- hosts: test-lvm-arch
vars_files:
- vars/test-lvm-arch_create.yml
remote_user: vagrant
become: true
gather_facts: true
Expand All @@ -94,7 +92,7 @@

- hosts: test-lvm-arch
vars_files:
- vars/test-lvm-arch_create.yml
- vars/test-lvm-arch_delete.yml
remote_user: vagrant
become: true
gather_facts: true
Expand All @@ -103,9 +101,9 @@
include_role:
name: githubixx.lvm

- hosts: test-lvm-arch
- hosts: test-lvm-opensuse-leap-15-3
vars_files:
- vars/test-lvm-arch_delete.yml
- vars/test-lvm-minimal.yml
remote_user: vagrant
become: true
gather_facts: true
Expand All @@ -114,7 +112,9 @@
include_role:
name: githubixx.lvm

- hosts: test-lvm-opensuse-leap
- hosts: test-lvm-opensuse-leap-15-4
vars_files:
- vars/test-lvm-minimal.yml
remote_user: vagrant
become: true
gather_facts: true
Expand All @@ -124,6 +124,8 @@
name: githubixx.lvm

- hosts: test-lvm-debian11
vars_files:
- vars/test-lvm-minimal.yml
remote_user: vagrant
become: true
gather_facts: true
Expand Down
Loading

0 comments on commit 579552d

Please sign in to comment.