chef-ruby-lvm 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.editorconfig +19 -0
- data/.envrc +1 -0
- data/.gitattributes +1 -0
- data/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md +6 -6
- data/.github/ISSUE_TEMPLATE/ENHANCEMENT_REQUEST_TEMPLATE.md +3 -3
- data/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md +2 -3
- data/.github/PULL_REQUEST_TEMPLATE.md +1 -1
- data/.github/dependabot.yml +7 -7
- data/.github/workflows/ci.yml +112 -0
- data/.github/workflows/publish.yaml +34 -0
- data/.gitignore +47 -7
- data/.markdownlint-cli2.yaml +8 -0
- data/.overcommit.yml +24 -0
- data/.release-please-manifest.json +3 -0
- data/.yamllint +15 -0
- data/CHANGELOG.md +7 -0
- data/CODE_OF_CONDUCT.md +3 -1
- data/CONTRIBUTING.md +2 -1
- data/Gemfile +4 -1
- data/Policyfile.rb +16 -0
- data/TESTING.md +3 -0
- data/chef-ruby-lvm.gemspec +2 -3
- data/chefignore +115 -0
- data/examples/create_snapshot.rb +4 -4
- data/kitchen.dokken.yml +111 -0
- data/kitchen.exec.yml +10 -0
- data/kitchen.yml +40 -0
- data/lib/lvm/version.rb +1 -1
- data/lib/lvm/wrapper.rb +2 -3
- data/lib/lvm.rb +10 -1
- data/release-please-config.json +11 -0
- data/renovate.json +18 -0
- data/test/fixtures/cookbooks/test/metadata.rb +4 -0
- data/test/fixtures/cookbooks/test/recipes/default.rb +1 -0
- data/test/test_lvm.rb +36 -0
- metadata +25 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d999e04478c7c06991574290ebcecdf862c720295d645951c16ec99ce789b545
|
|
4
|
+
data.tar.gz: d9336404d4310839d41256d7e6639e6b1a5e4e1d026c03a38d232f788fe994b1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa1a13c51f6699789b777cf2f46b850f79c4be7a9a142d184e341b357d9b90b2e30e25efca5028f0f18554e3e6bc3eadd6a7caf9d5401de437d6513c5ef1994c
|
|
7
|
+
data.tar.gz: 10fea77b2e669a316dc0d410469aa238f5f97e410c4dff34f4f8bf88d9ebc72ee2968d4abd4305567a851d185f5ece09568d51d03fcdb4e2841f44c2029f8b6d
|
data/.editorconfig
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# https://EditorConfig.org
|
|
2
|
+
|
|
3
|
+
# top-most EditorConfig file
|
|
4
|
+
root=true
|
|
5
|
+
|
|
6
|
+
# Unix-style newlines with a newline ending every file
|
|
7
|
+
[*]
|
|
8
|
+
end_of_line = lf
|
|
9
|
+
insert_final_newline = true
|
|
10
|
+
|
|
11
|
+
# 2 space indentation
|
|
12
|
+
indent_style = space
|
|
13
|
+
indent_size = 2
|
|
14
|
+
|
|
15
|
+
# Avoid issues parsing cookbook files later
|
|
16
|
+
charset = utf-8
|
|
17
|
+
|
|
18
|
+
# Avoid cookstyle warnings
|
|
19
|
+
trim_trailing_whitespace = true
|
data/.envrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
use chefworkstation
|
data/.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* text=auto eol=lf
|
|
@@ -4,26 +4,26 @@ about: If something isn't working as expected �.
|
|
|
4
4
|
labels: "Status: Untriaged"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Version
|
|
7
|
+
# Version
|
|
8
8
|
|
|
9
9
|
[Version of the project installed]
|
|
10
10
|
|
|
11
|
-
# Environment
|
|
11
|
+
# Environment
|
|
12
12
|
|
|
13
13
|
[Details about the environment such as the Operating System, cookbook details, etc...]
|
|
14
14
|
|
|
15
|
-
# Scenario
|
|
15
|
+
# Scenario
|
|
16
16
|
|
|
17
17
|
[What you are trying to achieve and you can't?]
|
|
18
18
|
|
|
19
|
-
# Steps to Reproduce
|
|
19
|
+
# Steps to Reproduce
|
|
20
20
|
|
|
21
21
|
[If you are filing an issue what are the things we need to do in order to repro your problem?]
|
|
22
22
|
|
|
23
|
-
# Expected Result
|
|
23
|
+
# Expected Result
|
|
24
24
|
|
|
25
25
|
[What are you expecting to happen as the consequence of above reproduction steps?]
|
|
26
26
|
|
|
27
|
-
# Actual Result
|
|
27
|
+
# Actual Result
|
|
28
28
|
|
|
29
29
|
[What actually happens after the reproduction steps?]
|
|
@@ -4,14 +4,14 @@ about: I have a suggestion (and may want to implement it 🙂)!
|
|
|
4
4
|
labels: "Status: Untriaged"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
### Describe the Enhancement
|
|
7
|
+
### Describe the Enhancement
|
|
8
8
|
<!--- What you are trying to achieve that you can't? -->
|
|
9
9
|
|
|
10
|
-
### Describe the Need
|
|
10
|
+
### Describe the Need
|
|
11
11
|
<!--- What kind of user do you believe would utilize this enhancement, and how many users might want this functionality -->
|
|
12
12
|
|
|
13
13
|
### Current Alternative
|
|
14
14
|
<!--- Is there a current alternative that you can utilize to workaround the lack of this enhancement -->
|
|
15
15
|
|
|
16
|
-
### Can We Help You Implement This
|
|
16
|
+
### Can We Help You Implement This?
|
|
17
17
|
<!--- The best way to ensure your enhancement is built is to help implement the enhancement yourself. If you're interested in helping out we'd love to give you a hand to make this possible. Let us know if there's something you need. -->
|
|
@@ -5,8 +5,7 @@ about: If you have a question 💬, please check out our Slack!
|
|
|
5
5
|
|
|
6
6
|
We use GitHub issues to track bugs and feature requests. If you need help please post to our Mailing List or join the Chef Community Slack.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
* Chef Community Slack at <http://community-slack.chef.io/>.
|
|
9
|
+
* Chef Mailing List <https://discourse.chef.io/>
|
|
11
10
|
|
|
12
11
|
Support issues opened here will be closed and redirected to Slack or Discourse.
|
|
@@ -12,4 +12,4 @@ StackOverflow discussions that are relevant]
|
|
|
12
12
|
- [ ] New functionality includes tests
|
|
13
13
|
- [ ] All tests pass
|
|
14
14
|
- [ ] All commits have been signed-off for the Developer Certificate of Origin. See <https://github.com/chef/chef/blob/master/CONTRIBUTING.md#developer-certification-of-origin-dco>
|
|
15
|
-
- [ ] PR title is a worthy inclusion in the CHANGELOG
|
|
15
|
+
- [ ] PR title is a worthy inclusion in the CHANGELOG
|
data/.github/dependabot.yml
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
version: 2
|
|
2
2
|
updates:
|
|
3
|
-
- package-ecosystem: bundler
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
- package-ecosystem: bundler
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: daily
|
|
7
|
+
time: "06:00"
|
|
8
|
+
timezone: America/Los_Angeles
|
|
9
|
+
open-pull-requests-limit: 10
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Unit Test
|
|
3
|
+
|
|
4
|
+
'on':
|
|
5
|
+
pull_request:
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
markdownlint:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v6
|
|
15
|
+
- uses: DavidAnson/markdownlint-cli2-action@v23
|
|
16
|
+
with:
|
|
17
|
+
globs: '**/*.md'
|
|
18
|
+
config: '.markdownlint-cli2.yaml'
|
|
19
|
+
|
|
20
|
+
yamllint:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v6
|
|
24
|
+
- uses: ibiqlik/action-yamllint@v3
|
|
25
|
+
with:
|
|
26
|
+
config_file: .yamllint
|
|
27
|
+
file_or_dir: '.'
|
|
28
|
+
strict: false
|
|
29
|
+
|
|
30
|
+
cookstyle:
|
|
31
|
+
env:
|
|
32
|
+
BUNDLE_WITHOUT: integration
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
strategy:
|
|
35
|
+
matrix:
|
|
36
|
+
ruby: ['3.4']
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v6
|
|
39
|
+
- uses: ruby/setup-ruby@v1
|
|
40
|
+
with:
|
|
41
|
+
ruby-version: ${{ matrix.ruby }}
|
|
42
|
+
bundler-cache: false
|
|
43
|
+
- uses: r7kamura/rubocop-problem-matchers-action@v1
|
|
44
|
+
- run: gem install cookstyle && cookstyle --chefstyle
|
|
45
|
+
|
|
46
|
+
test:
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
strategy:
|
|
49
|
+
matrix:
|
|
50
|
+
ruby: ['3.1', '3.4']
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/checkout@v6
|
|
53
|
+
- uses: ruby/setup-ruby@v1
|
|
54
|
+
with:
|
|
55
|
+
ruby-version: ${{ matrix.ruby }}
|
|
56
|
+
bundler-cache: true
|
|
57
|
+
- name: Run unit tests
|
|
58
|
+
run: bundle exec ruby -Ilib test/test_lvm.rb
|
|
59
|
+
|
|
60
|
+
# kitchen:
|
|
61
|
+
# runs-on: ubuntu-latest
|
|
62
|
+
# strategy:
|
|
63
|
+
# matrix:
|
|
64
|
+
# os:
|
|
65
|
+
# - almalinux-8
|
|
66
|
+
# - almalinux-9
|
|
67
|
+
# - almalinux-10
|
|
68
|
+
# - amazonlinux-2023
|
|
69
|
+
# - debian-12
|
|
70
|
+
# - debian-13
|
|
71
|
+
# - centos-stream-9
|
|
72
|
+
# - centos-stream-10
|
|
73
|
+
# - fedora-latest
|
|
74
|
+
# - ubuntu-2204
|
|
75
|
+
# - ubuntu-2404
|
|
76
|
+
# - ubuntu-2604
|
|
77
|
+
# - rockylinux-8
|
|
78
|
+
# - rockylinux-9
|
|
79
|
+
# - rockylinux-10
|
|
80
|
+
# fail-fast: false
|
|
81
|
+
|
|
82
|
+
# steps:
|
|
83
|
+
# - name: Check out code
|
|
84
|
+
# uses: actions/checkout@v6
|
|
85
|
+
# - name: Setup HashiCorp Vagrant
|
|
86
|
+
# run: |
|
|
87
|
+
# wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
|
|
88
|
+
# echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
|
|
89
|
+
# sudo apt update
|
|
90
|
+
# sudo apt install -y vagrant
|
|
91
|
+
# - name: Setup Virtualbox
|
|
92
|
+
# run: |
|
|
93
|
+
# echo "deb [signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
|
|
94
|
+
# wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg --dearmor
|
|
95
|
+
# sudo apt-get update
|
|
96
|
+
# # updated vbox install to 7.2. New releases of bento boxes are now starting to default to EFI versions and vbox 7.1 added support for nvram settings.
|
|
97
|
+
# # GHA ubuntu 24.04 doesn't have vbox 7.1+ in it's default repo just 7.0.x and thus requires a specific version to be specified to use vbox repos
|
|
98
|
+
# # TODO: When 26.04 Ubuntu is available for GHA runners if it has vbox 7.1 or greater in it's default repos we can revert back to using more future proof `virtualbox` pkg name without version specified.
|
|
99
|
+
# sudo apt-get install -y build-essential software-properties-common virtualbox-7.2
|
|
100
|
+
# - name: Check versions
|
|
101
|
+
# run: |
|
|
102
|
+
# vagrant --version
|
|
103
|
+
# vboxmanage --version
|
|
104
|
+
# - name: Install Chef
|
|
105
|
+
# uses: actionshub/chef-install@6.0.0
|
|
106
|
+
# - name: test-kitchen
|
|
107
|
+
# uses: actionshub/test-kitchen@3.0.0
|
|
108
|
+
# env:
|
|
109
|
+
# CHEF_LICENSE: accept-no-persist
|
|
110
|
+
# with:
|
|
111
|
+
# suite: default
|
|
112
|
+
# os: ${{ matrix.os }}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: release-please
|
|
3
|
+
|
|
4
|
+
"on":
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
release-please:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: googleapis/release-please-action@v5
|
|
14
|
+
id: release
|
|
15
|
+
if: github.event_name != 'workflow_dispatch'
|
|
16
|
+
with:
|
|
17
|
+
token: ${{ secrets.PORTER_GITHUB_TOKEN }}
|
|
18
|
+
|
|
19
|
+
- name: Checkout
|
|
20
|
+
uses: actions/checkout@v6
|
|
21
|
+
if: ${{ steps.release.outputs.release_created || github.event_name == 'workflow_dispatch' }}
|
|
22
|
+
|
|
23
|
+
- name: Build and publish to GitHub Package
|
|
24
|
+
uses: actionshub/publish-gem-to-github@main
|
|
25
|
+
if: ${{ steps.release.outputs.release_created || github.event_name == 'workflow_dispatch' }}
|
|
26
|
+
with:
|
|
27
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
28
|
+
owner: ${{ secrets.OWNER }}
|
|
29
|
+
|
|
30
|
+
- name: Build and publish to RubyGems
|
|
31
|
+
uses: actionshub/publish-gem-to-rubygems@main
|
|
32
|
+
if: ${{ steps.release.outputs.release_created || github.event_name == 'workflow_dispatch' }}
|
|
33
|
+
with:
|
|
34
|
+
token: ${{ secrets.RUBYGEMS_API_KEY }}
|
data/.gitignore
CHANGED
|
@@ -1,9 +1,49 @@
|
|
|
1
|
-
*.
|
|
1
|
+
*.rbc
|
|
2
|
+
.config
|
|
3
|
+
InstalledFiles
|
|
4
|
+
pkg
|
|
5
|
+
test/tmp
|
|
6
|
+
test/version_tmp
|
|
7
|
+
tmp
|
|
8
|
+
_Store
|
|
9
|
+
*~
|
|
10
|
+
*#
|
|
11
|
+
.#*
|
|
12
|
+
\#*#
|
|
13
|
+
*.un~
|
|
14
|
+
*.tmp
|
|
15
|
+
*.bk
|
|
16
|
+
*.bkup
|
|
17
|
+
|
|
18
|
+
# editor files
|
|
19
|
+
.idea
|
|
20
|
+
.*.sw[a-z]
|
|
21
|
+
|
|
22
|
+
# ruby/bundler/rspec files
|
|
23
|
+
.ruby-version
|
|
24
|
+
.ruby-gemset
|
|
25
|
+
.rvmrc
|
|
2
26
|
Gemfile.lock
|
|
3
|
-
pkg/
|
|
4
|
-
tmp/
|
|
5
|
-
coverage/
|
|
6
|
-
.DS_Store
|
|
7
27
|
.bundle
|
|
8
|
-
|
|
9
|
-
|
|
28
|
+
*.gem
|
|
29
|
+
coverage
|
|
30
|
+
spec/reports
|
|
31
|
+
|
|
32
|
+
# YARD / rdoc artifacts
|
|
33
|
+
.yardoc
|
|
34
|
+
_yardoc
|
|
35
|
+
doc/
|
|
36
|
+
rdoc
|
|
37
|
+
|
|
38
|
+
# chef infra stuff
|
|
39
|
+
Berksfile.lock
|
|
40
|
+
.kitchen
|
|
41
|
+
kitchen.local.yml
|
|
42
|
+
vendor/
|
|
43
|
+
.coverage/
|
|
44
|
+
.zero-knife.rb
|
|
45
|
+
Policyfile.lock.json
|
|
46
|
+
|
|
47
|
+
# vagrant stuff
|
|
48
|
+
.vagrant/
|
|
49
|
+
.vagrant.d/
|
data/.overcommit.yml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
PreCommit:
|
|
3
|
+
TrailingWhitespace:
|
|
4
|
+
enabled: true
|
|
5
|
+
YamlLint:
|
|
6
|
+
enabled: true
|
|
7
|
+
required_executable: "yamllint"
|
|
8
|
+
ChefSpec:
|
|
9
|
+
enabled: true
|
|
10
|
+
required_executable: "chef"
|
|
11
|
+
command: ["chef", "exec", "rspec"]
|
|
12
|
+
Cookstyle:
|
|
13
|
+
enabled: true
|
|
14
|
+
required_executable: "cookstyle"
|
|
15
|
+
command: ["cookstyle"]
|
|
16
|
+
MarkdownLint:
|
|
17
|
+
enabled: false
|
|
18
|
+
required_executable: "npx"
|
|
19
|
+
command: ["npx", "markdownlint-cli2", "'**/*.md'"]
|
|
20
|
+
include: ["**/*.md"]
|
|
21
|
+
|
|
22
|
+
CommitMsg:
|
|
23
|
+
HardTabs:
|
|
24
|
+
enabled: true
|
data/.yamllint
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
extends: default
|
|
3
|
+
rules:
|
|
4
|
+
line-length:
|
|
5
|
+
max: 256
|
|
6
|
+
level: warning
|
|
7
|
+
document-start: disable
|
|
8
|
+
braces:
|
|
9
|
+
forbid: false
|
|
10
|
+
min-spaces-inside: 0
|
|
11
|
+
max-spaces-inside: 1
|
|
12
|
+
min-spaces-inside-empty: -1
|
|
13
|
+
max-spaces-inside-empty: -1
|
|
14
|
+
comments:
|
|
15
|
+
min-spaces-from-content: 1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Change log
|
|
2
2
|
|
|
3
|
+
## [0.4.4](https://github.com/sous-chefs/chef-ruby-lvm/compare/v0.4.3...v0.4.4) (2026-06-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* Add release please ([#17](https://github.com/sous-chefs/chef-ruby-lvm/issues/17)) ([e1d174f](https://github.com/sous-chefs/chef-ruby-lvm/commit/e1d174f3b61f9434d2806d31550f0d1a52483419))
|
|
9
|
+
|
|
3
10
|
## 0.4.3
|
|
4
11
|
|
|
5
12
|
- Update open4 requirement
|
data/CODE_OF_CONDUCT.md
CHANGED
data/CONTRIBUTING.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
# Contributing
|
|
2
2
|
|
|
3
|
-
Please refer to
|
|
3
|
+
Please refer to
|
|
4
|
+
[https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD)
|
data/Gemfile
CHANGED
data/Policyfile.rb
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Policyfile.rb - Describe how you want Chef Infra Client to build your system.
|
|
2
|
+
#
|
|
3
|
+
# For more information on the Policyfile feature, visit
|
|
4
|
+
# https://docs.chef.io/policyfile.html
|
|
5
|
+
|
|
6
|
+
# A name that describes what the system you're building with Chef does.
|
|
7
|
+
name "test"
|
|
8
|
+
|
|
9
|
+
# Where to find external cookbooks:
|
|
10
|
+
default_source :supermarket
|
|
11
|
+
|
|
12
|
+
# run_list: chef-client will run these recipes in the order specified.
|
|
13
|
+
run_list "test"
|
|
14
|
+
|
|
15
|
+
# Specify a custom source for a single cookbook:
|
|
16
|
+
cookbook "test", path: "test/fixtures/cookbooks/test"
|
data/TESTING.md
ADDED
data/chef-ruby-lvm.gemspec
CHANGED
|
@@ -9,11 +9,10 @@ Gem::Specification.new do |gem|
|
|
|
9
9
|
gem.summary = "A wrapper for the LVM2 administration utility, lvm."
|
|
10
10
|
gem.homepage = "https://github.com/chef/chef-ruby-lvm"
|
|
11
11
|
gem.files = `git ls-files`.split($\)
|
|
12
|
-
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
|
13
12
|
gem.name = "chef-ruby-lvm"
|
|
14
13
|
gem.require_paths = ["lib"]
|
|
15
14
|
gem.version = LVM::VERSION
|
|
16
15
|
|
|
17
|
-
gem.
|
|
18
|
-
gem.
|
|
16
|
+
gem.add_dependency "chef-ruby-lvm-attrib", ">= 0.3"
|
|
17
|
+
gem.add_dependency "open4", ">= 0.9.6", "< 2.0"
|
|
19
18
|
end
|
data/chefignore
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Put files/directories that should be ignored in this file when uploading
|
|
2
|
+
# to a Chef Infra Server or Supermarket.
|
|
3
|
+
# Lines that start with '# ' are comments.
|
|
4
|
+
|
|
5
|
+
# OS generated files #
|
|
6
|
+
######################
|
|
7
|
+
.DS_Store
|
|
8
|
+
ehthumbs.db
|
|
9
|
+
Icon?
|
|
10
|
+
nohup.out
|
|
11
|
+
Thumbs.db
|
|
12
|
+
.envrc
|
|
13
|
+
|
|
14
|
+
# EDITORS #
|
|
15
|
+
###########
|
|
16
|
+
.#*
|
|
17
|
+
.project
|
|
18
|
+
.settings
|
|
19
|
+
*_flymake
|
|
20
|
+
*_flymake.*
|
|
21
|
+
*.bak
|
|
22
|
+
*.sw[a-z]
|
|
23
|
+
*.tmproj
|
|
24
|
+
*~
|
|
25
|
+
\#*
|
|
26
|
+
REVISION
|
|
27
|
+
TAGS*
|
|
28
|
+
tmtags
|
|
29
|
+
.vscode
|
|
30
|
+
.editorconfig
|
|
31
|
+
|
|
32
|
+
## COMPILED ##
|
|
33
|
+
##############
|
|
34
|
+
*.class
|
|
35
|
+
*.com
|
|
36
|
+
*.dll
|
|
37
|
+
*.exe
|
|
38
|
+
*.o
|
|
39
|
+
*.pyc
|
|
40
|
+
*.so
|
|
41
|
+
*/rdoc/
|
|
42
|
+
a.out
|
|
43
|
+
mkmf.log
|
|
44
|
+
|
|
45
|
+
# Testing #
|
|
46
|
+
###########
|
|
47
|
+
.circleci/*
|
|
48
|
+
.codeclimate.yml
|
|
49
|
+
.delivery/*
|
|
50
|
+
.foodcritic
|
|
51
|
+
.kitchen*
|
|
52
|
+
.mdlrc
|
|
53
|
+
.overcommit.yml
|
|
54
|
+
.rspec
|
|
55
|
+
.rubocop.yml
|
|
56
|
+
.travis.yml
|
|
57
|
+
.watchr
|
|
58
|
+
.yamllint
|
|
59
|
+
azure-pipelines.yml
|
|
60
|
+
Dangerfile
|
|
61
|
+
examples/*
|
|
62
|
+
features/*
|
|
63
|
+
Guardfile
|
|
64
|
+
kitchen*.yml
|
|
65
|
+
mlc_config.json
|
|
66
|
+
Procfile
|
|
67
|
+
Rakefile
|
|
68
|
+
spec/*
|
|
69
|
+
test/*
|
|
70
|
+
|
|
71
|
+
# SCM #
|
|
72
|
+
#######
|
|
73
|
+
.git
|
|
74
|
+
.gitattributes
|
|
75
|
+
.gitconfig
|
|
76
|
+
.github/*
|
|
77
|
+
.gitignore
|
|
78
|
+
.gitkeep
|
|
79
|
+
.gitmodules
|
|
80
|
+
.svn
|
|
81
|
+
*/.bzr/*
|
|
82
|
+
*/.git
|
|
83
|
+
*/.hg/*
|
|
84
|
+
*/.svn/*
|
|
85
|
+
|
|
86
|
+
# Berkshelf #
|
|
87
|
+
#############
|
|
88
|
+
Berksfile
|
|
89
|
+
Berksfile.lock
|
|
90
|
+
cookbooks/*
|
|
91
|
+
tmp
|
|
92
|
+
|
|
93
|
+
# Bundler #
|
|
94
|
+
###########
|
|
95
|
+
vendor/*
|
|
96
|
+
Gemfile
|
|
97
|
+
Gemfile.lock
|
|
98
|
+
|
|
99
|
+
# Policyfile #
|
|
100
|
+
##############
|
|
101
|
+
Policyfile.rb
|
|
102
|
+
Policyfile.lock.json
|
|
103
|
+
|
|
104
|
+
# Documentation #
|
|
105
|
+
#############
|
|
106
|
+
CODE_OF_CONDUCT*
|
|
107
|
+
CONTRIBUTING*
|
|
108
|
+
documentation/*
|
|
109
|
+
TESTING*
|
|
110
|
+
UPGRADING*
|
|
111
|
+
|
|
112
|
+
# Vagrant #
|
|
113
|
+
###########
|
|
114
|
+
.vagrant
|
|
115
|
+
Vagrantfile
|
data/examples/create_snapshot.rb
CHANGED
|
@@ -20,9 +20,9 @@ end
|
|
|
20
20
|
lvm.raw("lvcreate --snapshot --size 10M --name #{snap} #{vol}")
|
|
21
21
|
lv = lvm.logical_volumes[snap]
|
|
22
22
|
|
|
23
|
-
out =
|
|
24
|
-
snapshot of #{vol}, #{snap}, created
|
|
25
|
-
- uuid: #{lv.uuid}
|
|
26
|
-
- major,minor: #{lv.kernel_major},#{lv.kernel_minor}
|
|
23
|
+
out = <<~MSG
|
|
24
|
+
snapshot of #{vol}, #{snap}, created
|
|
25
|
+
- uuid: #{lv.uuid}
|
|
26
|
+
- major,minor: #{lv.kernel_major},#{lv.kernel_minor}
|
|
27
27
|
MSG
|
|
28
28
|
puts out
|
data/kitchen.dokken.yml
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
driver:
|
|
2
|
+
name: dokken
|
|
3
|
+
privileged: true
|
|
4
|
+
chef_version: <%= ENV['CHEF_VERSION'] || 'current' %>
|
|
5
|
+
|
|
6
|
+
transport:
|
|
7
|
+
name: dokken
|
|
8
|
+
|
|
9
|
+
provisioner:
|
|
10
|
+
name: dokken
|
|
11
|
+
|
|
12
|
+
platforms:
|
|
13
|
+
- name: almalinux-8
|
|
14
|
+
driver:
|
|
15
|
+
image: dokken/almalinux-8
|
|
16
|
+
pid_one_command: /usr/lib/systemd/systemd
|
|
17
|
+
|
|
18
|
+
- name: almalinux-9
|
|
19
|
+
driver:
|
|
20
|
+
image: dokken/almalinux-9
|
|
21
|
+
pid_one_command: /usr/lib/systemd/systemd
|
|
22
|
+
|
|
23
|
+
- name: almalinux-10
|
|
24
|
+
driver:
|
|
25
|
+
image: dokken/almalinux-10
|
|
26
|
+
pid_one_command: /usr/lib/systemd/systemd
|
|
27
|
+
|
|
28
|
+
- name: amazonlinux-2023
|
|
29
|
+
driver:
|
|
30
|
+
image: dokken/amazonlinux-2023
|
|
31
|
+
pid_one_command: /usr/lib/systemd/systemd
|
|
32
|
+
|
|
33
|
+
- name: centos-stream-9
|
|
34
|
+
driver:
|
|
35
|
+
image: dokken/centos-stream-9
|
|
36
|
+
pid_one_command: /usr/lib/systemd/systemd
|
|
37
|
+
|
|
38
|
+
- name: centos-stream-10
|
|
39
|
+
driver:
|
|
40
|
+
image: dokken/centos-stream-10
|
|
41
|
+
pid_one_command: /usr/lib/systemd/systemd
|
|
42
|
+
|
|
43
|
+
- name: debian-12
|
|
44
|
+
driver:
|
|
45
|
+
image: dokken/debian-12
|
|
46
|
+
pid_one_command: /bin/systemd
|
|
47
|
+
|
|
48
|
+
- name: debian-13
|
|
49
|
+
driver:
|
|
50
|
+
image: dokken/debian-13
|
|
51
|
+
pid_one_command: /bin/systemd
|
|
52
|
+
|
|
53
|
+
- name: fedora-latest
|
|
54
|
+
driver:
|
|
55
|
+
image: dokken/fedora-latest
|
|
56
|
+
pid_one_command: /usr/lib/systemd/systemd
|
|
57
|
+
|
|
58
|
+
- name: opensuse-leap-15
|
|
59
|
+
driver:
|
|
60
|
+
image: dokken/opensuse-leap-15
|
|
61
|
+
pid_one_command: /usr/lib/systemd/systemd
|
|
62
|
+
|
|
63
|
+
- name: opensuse-leap-16
|
|
64
|
+
driver:
|
|
65
|
+
image: dokken/opensuse-leap-16
|
|
66
|
+
pid_one_command: /usr/lib/systemd/systemd
|
|
67
|
+
|
|
68
|
+
- name: oraclelinux-8
|
|
69
|
+
driver:
|
|
70
|
+
image: dokken/oraclelinux-8
|
|
71
|
+
pid_one_command: /usr/lib/systemd/systemd
|
|
72
|
+
|
|
73
|
+
- name: oraclelinux-9
|
|
74
|
+
driver:
|
|
75
|
+
image: dokken/oraclelinux-9
|
|
76
|
+
pid_one_command: /usr/lib/systemd/systemd
|
|
77
|
+
|
|
78
|
+
- name: oraclelinux-10
|
|
79
|
+
driver:
|
|
80
|
+
image: dokken/oraclelinux-10
|
|
81
|
+
pid_one_command: /usr/lib/systemd/systemd
|
|
82
|
+
|
|
83
|
+
- name: rockylinux-8
|
|
84
|
+
driver:
|
|
85
|
+
image: dokken/rockylinux-8
|
|
86
|
+
pid_one_command: /usr/lib/systemd/systemd
|
|
87
|
+
|
|
88
|
+
- name: rockylinux-9
|
|
89
|
+
driver:
|
|
90
|
+
image: dokken/rockylinux-9
|
|
91
|
+
pid_one_command: /usr/lib/systemd/systemd
|
|
92
|
+
|
|
93
|
+
- name: rockylinux-10
|
|
94
|
+
driver:
|
|
95
|
+
image: dokken/rockylinux-10
|
|
96
|
+
pid_one_command: /usr/lib/systemd/systemd
|
|
97
|
+
|
|
98
|
+
- name: ubuntu-22.04
|
|
99
|
+
driver:
|
|
100
|
+
image: dokken/ubuntu-22.04
|
|
101
|
+
pid_one_command: /bin/systemd
|
|
102
|
+
|
|
103
|
+
- name: ubuntu-24.04
|
|
104
|
+
driver:
|
|
105
|
+
image: dokken/ubuntu-24.04
|
|
106
|
+
pid_one_command: /bin/systemd
|
|
107
|
+
|
|
108
|
+
- name: ubuntu-26.04
|
|
109
|
+
driver:
|
|
110
|
+
image: dokken/ubuntu-26.04
|
|
111
|
+
pid_one_command: /bin/systemd
|
data/kitchen.exec.yml
ADDED
data/kitchen.yml
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
driver:
|
|
3
|
+
name: vagrant
|
|
4
|
+
|
|
5
|
+
provisioner:
|
|
6
|
+
name: cinc_infra
|
|
7
|
+
product_name: cinc
|
|
8
|
+
product_version: <%= ENV['CHEF_VERSION'] || 'latest' %>
|
|
9
|
+
chef_license: accept-no-persist
|
|
10
|
+
|
|
11
|
+
verifier:
|
|
12
|
+
name: inspec
|
|
13
|
+
|
|
14
|
+
platforms:
|
|
15
|
+
- name: almalinux-8
|
|
16
|
+
- name: almalinux-9
|
|
17
|
+
- name: almalinux-10
|
|
18
|
+
- name: amazonlinux-2023
|
|
19
|
+
- name: centos-stream-9
|
|
20
|
+
- name: centos-stream-10
|
|
21
|
+
- name: debian-12
|
|
22
|
+
- name: debian-13
|
|
23
|
+
- name: fedora-latest
|
|
24
|
+
- name: opensuse-leap-15
|
|
25
|
+
- name: opensuse-leap-16
|
|
26
|
+
- name: oraclelinux-8
|
|
27
|
+
- name: oraclelinux-9
|
|
28
|
+
- name: oraclelinux-10
|
|
29
|
+
- name: rockylinux-8
|
|
30
|
+
- name: rockylinux-9
|
|
31
|
+
- name: rockylinux-10
|
|
32
|
+
- name: ubuntu-22.04
|
|
33
|
+
- name: ubuntu-24.04
|
|
34
|
+
- name: ubuntu-26.04
|
|
35
|
+
|
|
36
|
+
suites:
|
|
37
|
+
- name: default
|
|
38
|
+
verifier:
|
|
39
|
+
inspec_tests: test/integration/default
|
|
40
|
+
attributes:
|
data/lib/lvm/version.rb
CHANGED
data/lib/lvm/wrapper.rb
CHANGED
|
@@ -40,9 +40,8 @@ module LVM
|
|
|
40
40
|
module_function :process_line
|
|
41
41
|
|
|
42
42
|
def build_command(expected_attributes, base, additional_arguments = [])
|
|
43
|
-
opts =
|
|
44
|
-
|
|
45
|
-
opts << a[:column]
|
|
43
|
+
opts = expected_attributes.map do |a|
|
|
44
|
+
a[:column]
|
|
46
45
|
end
|
|
47
46
|
|
|
48
47
|
additional_arguments = [] if additional_arguments.nil?
|
data/lib/lvm.rb
CHANGED
|
@@ -59,7 +59,16 @@ module LVM
|
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
def version
|
|
62
|
-
|
|
62
|
+
self.class.parse_version(userland.lvm_version)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Extract the canonical X.Y.Z or X.Y.Z(N) version key used by
|
|
66
|
+
# chef-ruby-lvm-attrib attribute directories.
|
|
67
|
+
def self.parse_version(raw)
|
|
68
|
+
match = raw.to_s.match(/(\d+\.\d+\.\d+)(?:\((\d+))?/)
|
|
69
|
+
return raw.to_s if match.nil?
|
|
70
|
+
|
|
71
|
+
match[2] ? "#{match[1]}(#{match[2]})" : match[1]
|
|
63
72
|
end
|
|
64
73
|
|
|
65
74
|
# helper methods
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"packages": {
|
|
3
|
+
".": {
|
|
4
|
+
"changelog-path": "CHANGELOG.md",
|
|
5
|
+
"release-type": "ruby",
|
|
6
|
+
"include-component-in-tag": false,
|
|
7
|
+
"version-file": "lib/lvm/version.rb"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
|
11
|
+
}
|
data/renovate.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
+
"extends": ["config:base"],
|
|
4
|
+
"packageRules": [
|
|
5
|
+
{
|
|
6
|
+
"groupName": "Actions",
|
|
7
|
+
"matchUpdateTypes": ["minor", "patch", "pin"],
|
|
8
|
+
"automerge": true,
|
|
9
|
+
"addLabels": ["Release: Patch", "Skip: Announcements"]
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"groupName": "Actions",
|
|
13
|
+
"matchUpdateTypes": ["major"],
|
|
14
|
+
"automerge": false,
|
|
15
|
+
"addLabels": ["Release: Patch", "Skip: Announcements"]
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
include_recipe "lvm"
|
data/test/test_lvm.rb
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
require "minitest/autorun"
|
|
2
|
+
require_relative "../lib/lvm"
|
|
3
|
+
|
|
4
|
+
class TestLVMVersionParsing < Minitest::Test
|
|
5
|
+
def test_parses_classic_rhel_format
|
|
6
|
+
assert_equal "2.03.28(2)",
|
|
7
|
+
LVM::LVM.parse_version("2.03.28(2)-RHEL10 (2024-11-04)")
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def test_parses_rhel10_inline_dist_format
|
|
11
|
+
assert_equal "2.03.32(2)",
|
|
12
|
+
LVM::LVM.parse_version("2.03.32(2-RHEL10) (2025-05-05)")
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def test_parses_release_suffix_outside_parentheses
|
|
16
|
+
assert_equal "2.03.32(2)",
|
|
17
|
+
LVM::LVM.parse_version("2.03.32(2)-3.el10")
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def test_parses_older_rhel7_style
|
|
21
|
+
assert_equal "2.02.180(2)",
|
|
22
|
+
LVM::LVM.parse_version("2.02.180(2)-RHEL7 (2018-07-20)")
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def test_parses_plain_version_without_build_suffix
|
|
26
|
+
assert_equal "2.03.40", LVM::LVM.parse_version("2.03.40")
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def test_returns_input_unchanged_when_unparseable
|
|
30
|
+
assert_equal "garbage", LVM::LVM.parse_version("garbage")
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def test_handles_nil_input
|
|
34
|
+
assert_equal "", LVM::LVM.parse_version(nil)
|
|
35
|
+
end
|
|
36
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: chef-ruby-lvm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tim Smith
|
|
@@ -10,20 +10,20 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2026-06-04 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: chef-ruby-lvm-attrib
|
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
|
18
18
|
requirements:
|
|
19
|
-
- - "
|
|
19
|
+
- - ">="
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
21
|
version: '0.3'
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
25
|
requirements:
|
|
26
|
-
- - "
|
|
26
|
+
- - ">="
|
|
27
27
|
- !ruby/object:Gem::Version
|
|
28
28
|
version: '0.3'
|
|
29
29
|
- !ruby/object:Gem::Dependency
|
|
@@ -55,6 +55,9 @@ executables: []
|
|
|
55
55
|
extensions: []
|
|
56
56
|
extra_rdoc_files: []
|
|
57
57
|
files:
|
|
58
|
+
- ".editorconfig"
|
|
59
|
+
- ".envrc"
|
|
60
|
+
- ".gitattributes"
|
|
58
61
|
- ".github/CODEOWNERS"
|
|
59
62
|
- ".github/ISSUE_TEMPLATE/BUG_TEMPLATE.md"
|
|
60
63
|
- ".github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md"
|
|
@@ -62,18 +65,30 @@ files:
|
|
|
62
65
|
- ".github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md"
|
|
63
66
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
|
64
67
|
- ".github/dependabot.yml"
|
|
68
|
+
- ".github/workflows/ci.yml"
|
|
69
|
+
- ".github/workflows/publish.yaml"
|
|
65
70
|
- ".gitignore"
|
|
71
|
+
- ".markdownlint-cli2.yaml"
|
|
72
|
+
- ".overcommit.yml"
|
|
73
|
+
- ".release-please-manifest.json"
|
|
74
|
+
- ".yamllint"
|
|
66
75
|
- CHANGELOG.md
|
|
67
76
|
- CODE_OF_CONDUCT.md
|
|
68
77
|
- CONTRIBUTING.md
|
|
69
78
|
- Gemfile
|
|
79
|
+
- Policyfile.rb
|
|
70
80
|
- README.md
|
|
71
81
|
- Rakefile
|
|
82
|
+
- TESTING.md
|
|
72
83
|
- chef-ruby-lvm.gemspec
|
|
84
|
+
- chefignore
|
|
73
85
|
- examples/additional_arguments.rb
|
|
74
86
|
- examples/create_snapshot.rb
|
|
75
87
|
- examples/error_handling.rb
|
|
76
88
|
- examples/show_lvm_config.rb
|
|
89
|
+
- kitchen.dokken.yml
|
|
90
|
+
- kitchen.exec.yml
|
|
91
|
+
- kitchen.yml
|
|
77
92
|
- lib/lvm.rb
|
|
78
93
|
- lib/lvm/external.rb
|
|
79
94
|
- lib/lvm/logical_volume.rb
|
|
@@ -94,6 +109,10 @@ files:
|
|
|
94
109
|
- lib/lvm/wrapper/pvs.rb
|
|
95
110
|
- lib/lvm/wrapper/pvsseg.rb
|
|
96
111
|
- lib/lvm/wrapper/vgs.rb
|
|
112
|
+
- release-please-config.json
|
|
113
|
+
- renovate.json
|
|
114
|
+
- test/fixtures/cookbooks/test/metadata.rb
|
|
115
|
+
- test/fixtures/cookbooks/test/recipes/default.rb
|
|
97
116
|
- test/test_lvm.rb
|
|
98
117
|
homepage: https://github.com/chef/chef-ruby-lvm
|
|
99
118
|
licenses:
|
|
@@ -114,9 +133,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
114
133
|
- !ruby/object:Gem::Version
|
|
115
134
|
version: '0'
|
|
116
135
|
requirements: []
|
|
117
|
-
rubygems_version: 3.
|
|
136
|
+
rubygems_version: 3.5.9
|
|
118
137
|
signing_key:
|
|
119
138
|
specification_version: 4
|
|
120
139
|
summary: A wrapper for the LVM2 administration utility, lvm.
|
|
121
|
-
test_files:
|
|
122
|
-
- test/test_lvm.rb
|
|
140
|
+
test_files: []
|