-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cb0546c
Showing
44 changed files
with
2,468 additions
and
0 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 @@ | ||
-P ubuntu-latest=nektos/act-environments-ubuntu:18.04 |
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,7 @@ | ||
exclude_paths: | ||
- .cache/ | ||
- meta/ | ||
- molecule/ | ||
- .tox/ | ||
skip_list: | ||
- '106' # Role name {} does not match ``^[a-z][a-z0-9_]+$`` pattern |
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,32 @@ | ||
name-template: "v$RESOLVED_VERSION 🌈" | ||
tag-template: "v$RESOLVED_VERSION" | ||
categories: | ||
- title: "🚀 Features" | ||
labels: | ||
- "feature" | ||
- "enhancement" | ||
- title: "🐛 Bug Fixes" | ||
labels: | ||
- "fix" | ||
- "bugfix" | ||
- "bug" | ||
- title: "🧰 Maintenance" | ||
label: "chore" | ||
- title: "🧺 Miscellaneous" #Everything except ABAP | ||
label: "misc" | ||
change-template: "- $TITLE @$AUTHOR (#$NUMBER)" | ||
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||
version-resolver: | ||
major: | ||
labels: | ||
- "major" | ||
minor: | ||
labels: | ||
- "minor" | ||
patch: | ||
labels: | ||
- "patch" | ||
default: patch | ||
template: | | ||
## Changes | ||
$CHANGES |
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,52 @@ | ||
--- | ||
# This is a basic workflow to help you get started with Actions | ||
name: Molecule | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- master | ||
- tags/* | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
requirements: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: tcharl.ansible_volumes | ||
- name: install prereq | ||
run: | | ||
cd tcharl.ansible_volumes | ||
ansible-galaxy role install -r requirements-standalone.yml | ||
ansible-galaxy collection install -r requirements-collections.yml | ||
lint: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: tcharl.ansible_volumes | ||
- name: update apt | ||
run: | | ||
sudo apt update | ||
- name: install aptitude packages | ||
run: | | ||
sudo apt -y install sudo python3 python3-pip | ||
- name: pip install packages | ||
run: | | ||
pip3 install wheel setuptools tox | ||
- name: tox lint | ||
run: | | ||
cd tcharl.ansible_volumes | ||
tox -e lint |
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 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
# branches to consider in the event; optional, defaults to all | ||
branches: | ||
- main | ||
- master | ||
|
||
jobs: | ||
update_release_draft: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Drafts your next Release notes as Pull Requests are merged into "master" | ||
- uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,34 @@ | ||
--- | ||
name: Ansible Galaxy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
galaxy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- 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) |
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,4 @@ | ||
.idea | ||
**/*/__pycache__ | ||
.cache | ||
.tox |
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,41 @@ | ||
--- | ||
|
||
dist: jammy | ||
|
||
language: python | ||
python: | ||
- "3.11" | ||
addons: | ||
apt: | ||
sources: | ||
- sourceline: 'deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main' | ||
key_url: 'https://apt.releases.hashicorp.com/gpg' | ||
update: true | ||
packages: | ||
- bridge-utils | ||
- dnsmasq-base | ||
- ebtables | ||
- virtinst | ||
- libvirt-dev | ||
- libvirt-daemon-system | ||
- qemu-kvm | ||
- qemu-utils | ||
- ruby-dev | ||
- ca-certificates | ||
- curl | ||
- gcc | ||
- iproute2 | ||
- sudo | ||
- vagrant | ||
|
||
install: | ||
- vagrant plugin install vagrant-libvirt | ||
- pip install wheel pyopenssl tox | ||
- sudo chmod o+rwx /var/run/libvirt/libvirt-sock | ||
|
||
script: | ||
- mv ../ansible-volumes ../tcharl.ansible_volumes | ||
- travis_wait 30 tox -e test-exec -- --scenario-name kvm | ||
branches: | ||
only: | ||
- master |
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,35 @@ | ||
--- | ||
# Based on ansible-lint config | ||
extends: default | ||
ignore: | | ||
.cache | ||
.tox | ||
rules: | ||
braces: | ||
max-spaces-inside: 1 | ||
level: error | ||
brackets: | ||
max-spaces-inside: 1 | ||
level: error | ||
colons: | ||
max-spaces-after: -1 | ||
level: error | ||
commas: | ||
max-spaces-after: -1 | ||
level: error | ||
comments: disable | ||
comments-indentation: disable | ||
document-start: disable | ||
empty-lines: | ||
max: 3 | ||
level: error | ||
hyphens: | ||
level: error | ||
indentation: disable | ||
key-duplicates: enable | ||
line-length: disable | ||
new-line-at-end-of-file: disable | ||
new-lines: | ||
type: unix | ||
trailing-spaces: disable | ||
truthy: disable |
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,13 @@ | ||
Copyright 2020 Charlie Mordant | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
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,90 @@ | ||
Volumes | ||
========= | ||
|
||
* Galaxy: [](https://galaxy.ansible.com/tcharl/ansible_volumes) | ||
* Lint & requirements:  | ||
* Tests: [](https://travis-ci.com/OsgiliathEnterprise/ansible-volumes) | ||
* Chat: [](https://gitter.im/OsgiliathEnterprise/platform?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
|
||
This role is an extension of the [most used lvm cookbook](https://github.com/mrlesmithjr/ansible-manage-lvm). | ||
It add the ability to create thinpools and their associated metadata | ||
|
||
Role Variables | ||
-------------- | ||
|
||
In addition to the [usual variables](https://github.com/mrlesmithjr/ansible-manage-lvm/blob/master/README.md), you can declare some more in order to configure thinpools | ||
|
||
```yaml | ||
--- | ||
lvmetanames: | ||
... | ||
metadata: <another lvname> # declares the metadata logical volume | ||
``` | ||
```yaml | ||
--- | ||
lvmetanames: | ||
... | ||
autoextendtreshold: <number> # threshold of the autoextend profile | ||
autoextendpercent: <number> # percentage of the autoextend profile | ||
``` | ||
Full example | ||
```yaml | ||
--- | ||
vars: | ||
lvm_groups: | ||
- vgname: myvg | ||
disks: | ||
- /dev/sdb1 | ||
create: true | ||
lvnames: | ||
- lvname: notathinpool # original role | ||
size: 40%VG | ||
opts: "" | ||
create: true | ||
filesystem: xfs | ||
mntp: /var/stuff | ||
mount: true | ||
lvmetanames: | ||
- lvname: thinpool | ||
size: 40%VG | ||
opts: "--wipesignatures y" | ||
create: true | ||
metadata: myvg/thinpoolmeta | ||
autoextendtreshold: 80 | ||
autoextendpercent: 20 | ||
filesystem: xfs | ||
mntp: /var/lib/docker | ||
mount: true | ||
- lvname: thinpoolmeta | ||
size: 10%VG | ||
opts: "--wipesignatures y" | ||
create: true | ||
manage_lvm: true | ||
``` | ||
Also configures NFS server, but only if the machine is protected by Kerberos (see tcharl.ansible_securehost in order to configure it) | ||
Dependencies | ||
------------ | ||
As said, [mrlesmithjr.ansible-manage-lvm](https://github.com/mrlesmithjr/ansible-manage-lvm) | ||
Example Playbook | ||
---------------- | ||
See the [vars declared](https://github.com/OsgiliathEnterprise/ansible-volumes/blob/master/molecule/default/molecule.yml) on the molecule test, as well as [their impact](https://github.com/OsgiliathEnterprise/ansible-manage-lvm-plus/blob/master/molecule/default/tests/test_default.py) | ||
License | ||
------- | ||
[Apache-2](https://www.apache.org/licenses/LICENSE-2.0) | ||
Author Information | ||
------------------ | ||
* Twitter [@tcharl](https://twitter.com/Tcharl) | ||
* Github [@tcharl](https://github.com/Tcharl) | ||
* LinkedIn [Charlie Mordant](https://www.linkedin.com/in/charlie-mordant-51796a97/) |
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,5 @@ | ||
--- | ||
# defaults file for lvm | ||
|
||
standalone_role: True | ||
secure_logs: Yes |
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,21 @@ | ||
--- | ||
namespace: "tcharl" | ||
name: "ansible_volumes" | ||
version: "1.0.1" | ||
description: "Manipulates volume groups and logical volumes" | ||
|
||
authors: | ||
- "Charlie Mordant <cmordant1@gmail.com>" | ||
|
||
repository: "https://github.com/OsgiliathEnterprise/ansible_volumes" | ||
documentation: "https://github.com/OsgiliathEnterprise/ansible_volumes/blob/master/README.md" | ||
homepage: "https://github.com/OsgiliathEnterprise/ansible_volumes" | ||
issues: "https://github.com/OsgiliathEnterprise/ansible_volumes/issues" | ||
|
||
readme: "README.md" | ||
license: | ||
- "Apache-2.0" | ||
tags: | ||
- "volumes" | ||
- "volume-groups" | ||
- "logical-volumes" |
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,2 @@ | ||
install_date: Sat Aug 19 16:48:21 2023 | ||
version: v2.0.1 |
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,2 @@ | ||
if __name__ == "__main__": | ||
exit(0) |
Oops, something went wrong.