mirror of
https://github.com/mrlesmithjr/ansible-manage-lvm.git
synced 2026-09-02 21:50:36 +03:00
Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 84ba07bcaf | |||
| a623248cdf | |||
| 55b1745ac3 | |||
| c020c6ef2d | |||
| 47c980797d | |||
| d6dd5184f0 | |||
| 74e7ca5652 | |||
| 12346fa038 | |||
| 8dc044f7c2 | |||
| aa66814872 | |||
| 6e4f217d74 | |||
| 483ed18874 | |||
| ea2e60f043 | |||
| a28791cc48 | |||
| b5bf2d266c | |||
| ca903442c8 | |||
| 9e69c74f71 | |||
| e9ff7e3faf | |||
| 84bfdf54ad | |||
| 376f2ce641 | |||
| 6e74c9714e | |||
| 1f966d2ea1 | |||
| 71a3930e5b |
@@ -10,25 +10,21 @@ on:
|
||||
- develop
|
||||
- main
|
||||
- master
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
lint:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: macos-10.15
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 4
|
||||
matrix:
|
||||
python-version: [3.8]
|
||||
python-version: [3.9]
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- uses: actions/cache@v2
|
||||
|
||||
@@ -32,3 +32,5 @@ Larry Smith Jr.
|
||||
- [@mrlesmithjr](https://twitter.com/mrlesmithjr)
|
||||
- [mrlesmithjr@gmail.com](mailto:mrlesmithjr@gmail.com)
|
||||
- [http://everythingshouldbevirtual.com](http://everythingshouldbevirtual.com)
|
||||
|
||||
<a href="https://www.buymeacoffee.com/mrlesmithjr" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
|
||||
|
||||
@@ -31,6 +31,8 @@ lvm_groups: []
|
||||
# size: 40g
|
||||
# create: true
|
||||
# filesystem: ext4
|
||||
# # Defines options passed to the filesystem creation command
|
||||
# fsopts:
|
||||
# mount: true
|
||||
# mntp: /
|
||||
# - vgname: test-vg
|
||||
@@ -57,6 +59,20 @@ lvm_groups: []
|
||||
# lvnames:
|
||||
# # Set to None to only create LVM VG w/out creating LVM LVOLS
|
||||
# - None
|
||||
# # Using fsopts to create a docker compatible xfs volume
|
||||
# - vgname: docker-volumes
|
||||
# disks:
|
||||
# - /dev/vdc
|
||||
# - /dev/vdd
|
||||
# create: true
|
||||
# lvnames:
|
||||
# - lvname: docker_1
|
||||
# size: 100%FREE
|
||||
# create: true
|
||||
# filesystem: xfs
|
||||
# fsopts: -n ftype=1
|
||||
# mount: true
|
||||
# mntp: /var/lib/docker
|
||||
|
||||
# Defines if LVM will be managed by role
|
||||
# default is false to ensure nothing is changed by accident.
|
||||
|
||||
Generated
+1418
-1341
File diff suppressed because it is too large
Load Diff
@@ -33,7 +33,7 @@ filelock==3.4.0; python_version >= "3.6" and python_full_version < "3.0.0" or py
|
||||
flake8==4.0.1; python_version >= "3.6"
|
||||
ghp-import==2.0.2; python_version >= "3.6"
|
||||
gitdb==4.0.9; python_version >= "3.7"
|
||||
gitpython==3.1.24; python_version >= "3.7"
|
||||
gitpython==3.1.30; python_version >= "3.7"
|
||||
html5lib==1.1; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
||||
identify==2.4.0; python_full_version >= "3.6.1"
|
||||
idna==3.3; python_version >= "3.5" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.5"
|
||||
|
||||
+4
-4
@@ -44,8 +44,8 @@
|
||||
- block:
|
||||
- name: centos | installing sg3_utils
|
||||
package:
|
||||
name: sg3_utils
|
||||
state: present
|
||||
name: sg3_utils
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: centos | checking for scsi devices
|
||||
@@ -55,13 +55,13 @@
|
||||
changed_when: false
|
||||
|
||||
- name: centos | rescanning for new disks
|
||||
command: /usr/bin/rescan-scsi-bus.sh
|
||||
command: "{{ rescan_scsi_command }}"
|
||||
become: true
|
||||
changed_when: false
|
||||
when: scsi_devices.stdout|length > 0
|
||||
|
||||
- name: centos | rescanning for resized disks
|
||||
command: /usr/bin/rescan-scsi-bus.sh -s
|
||||
command: "{{ rescan_scsi_command }} -s"
|
||||
become: true
|
||||
changed_when: false
|
||||
when: scsi_devices.stdout|length > 0
|
||||
|
||||
@@ -45,12 +45,14 @@
|
||||
- lv.create|bool
|
||||
- lv.filesystem is defined
|
||||
- lv.filesystem != 'None'
|
||||
- lv.filesystem != 'swap'
|
||||
- lv.filesystem != 'xfs'
|
||||
|
||||
- name: create_fs | creating new xfs filesystem on new LVM logical volume(s)
|
||||
filesystem:
|
||||
fstype: "{{ lv.filesystem }}"
|
||||
dev: "/dev/{{ vg.vgname }}/{{ lv.lvname }}"
|
||||
opts: "{{ lv.fsopts | default(omit) }}"
|
||||
become: true
|
||||
when:
|
||||
- mountedxfs is failed
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
changed_when: false
|
||||
|
||||
- name: debian | rescanning for new disks added
|
||||
command: /sbin/rescan-scsi-bus
|
||||
command: "{{ rescan_scsi_command }}"
|
||||
become: true
|
||||
changed_when: false
|
||||
when: scsi_devices['stdout'] | length
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
---
|
||||
# tasks file for ansible-manage-lvm
|
||||
- name: Set rescan_scsi_command for old debian version
|
||||
set_fact:
|
||||
rescan_scsi_command: "/sbin/rescan-scsi-bus"
|
||||
when:
|
||||
- ansible_facts.distribution | replace(' ','') | lower == 'debian'
|
||||
- ansible_facts.distribution_release not in ('bookworm', 'sid')
|
||||
- ansible_facts.distribution_major_version is version(10, '<=')
|
||||
|
||||
- include_tasks: debian.yml
|
||||
when: ansible_facts.os_family == "Debian"
|
||||
|
||||
|
||||
@@ -3,3 +3,5 @@
|
||||
|
||||
ebsnvme_binary_helper_file: go-ebsnvme_{{ ebsnvme_binary_helper_ver }}_linux_amd64.tar.gz
|
||||
ebsnvme_binary_helper_url: https://github.com/mvisonneau/go-ebsnvme/releases/download/{{ ebsnvme_binary_helper_ver }}/{{ ebsnvme_binary_helper_file }}
|
||||
|
||||
rescan_scsi_command: "/usr/bin/rescan-scsi-bus.sh"
|
||||
|
||||
Reference in New Issue
Block a user