Skip to content

Commit 45ee8eb

Browse files
Merge pull request #313 from lablabs/feat/args_validation
Role argumentss validation
2 parents 094b557 + 51bb971 commit 45ee8eb

File tree

5 files changed

+502
-12
lines changed

5 files changed

+502
-12
lines changed

.github/CONTRIBUTING.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ Install [Pre-commit](https://pre-commit.com/#install) software
2323

2424
Do the changes in your own GitHub namespace.
2525

26-
## 5. Test the changes
26+
## 5. Define new variables in argument_specs.yml
2727

28-
**Note:** I will test the role again, so you don't need to do that if you don't want to.
28+
If you introduce any new variables, **you must also define them in the `meta/argument_specs.yml` file** with appropriate type, default, and description. This ensures proper validation and documentation for all role variables. Additionally, **add all new variables to the `README.md` file** (usually by updating the variables section, which is a copy of `defaults/main.yml`).
2929

30-
Install [molecule](https://molecule.readthedocs.io/en/stable/) and run the test:
30+
## 6. Test the changes
31+
32+
You can use Molecule for testing. Install [molecule](https://molecule.readthedocs.io/en/stable/) and run the test:
3133

3234
```bash
3335
pip install molecule molecule-docker ansible-lint docker
@@ -37,11 +39,11 @@ molecule test
3739

3840
> You will need to edit the files in `molecule/default` directory (please do not commit those changes)
3941
40-
## 6. Create a pull request
42+
## 7. Create a pull request
4143

4244
Please create a pull request into the `main` branch. Here is [how to do it](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork).
4345

44-
## 7. Semantic Commits
46+
## 8. Semantic Commits
4547

4648
Commits must follow conventional specs below:
4749

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
lint:
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-24.04
1111
strategy:
1212
fail-fast: true
1313
steps:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ rke2_channel: stable
194194

195195
# Do not deploy packaged components and delete any deployed components
196196
# Valid items: rke2-canal, rke2-coredns, rke2-ingress-nginx, rke2-metrics-server
197-
rke2_disable:
197+
rke2_disable: []
198198

199199
# Option to disable kube-proxy
200200
disable_kube_proxy: false
@@ -210,10 +210,10 @@ rke2_cloud_provider_name: "external"
210210

211211
# Path to custom manifests deployed during the RKE2 installation
212212
# It is possible to use Jinja2 templating in the manifests
213-
rke2_custom_manifests:
213+
rke2_custom_manifests: []
214214

215215
# Path to static pods deployed during the RKE2 installation
216-
rke2_static_pods:
216+
rke2_static_pods: []
217217

218218
# Configure custom Containerd Registry
219219
rke2_custom_registry_mirrors: []

defaults/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ rke2_channel: stable
156156

157157
# Do not deploy packaged components and delete any deployed components
158158
# Valid items: rke2-canal, rke2-coredns, rke2-ingress-nginx, rke2-metrics-server
159-
rke2_disable:
159+
rke2_disable: []
160160

161161
# Option to disable kube-proxy
162162
disable_kube_proxy: false
@@ -172,10 +172,10 @@ rke2_cloud_provider_name: "external"
172172

173173
# Path to custom manifests deployed during the RKE2 installation
174174
# It is possible to use Jinja2 templating in the manifests
175-
rke2_custom_manifests:
175+
rke2_custom_manifests: []
176176

177177
# Path to static pods deployed during the RKE2 installation
178-
rke2_static_pods:
178+
rke2_static_pods: []
179179

180180
# Configure custom Containerd Registry
181181
rke2_custom_registry_mirrors: []

0 commit comments

Comments
 (0)