You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/ansiblelint/rules/meta_runtime.md
+24-7Lines changed: 24 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,21 @@
1
1
# meta-runtime
2
2
3
-
This rule checks the meta/runtime.yml `requires_ansible` key against the list of currently supported versions of ansible-core.
3
+
This rule checks the meta/runtime.yml `requires_ansible` key against the list of
4
+
currently supported versions of ansible-core.
4
5
5
6
This rule can produce messages such as:
6
7
7
-
-`meta-runtime[unsupported-version]` - `requires_ansible` key must refer to a currently supported version such as: >=2.14.0, >=2.15.0, >=2.16.0
8
-
-`meta-runtime[invalid-version]` - `requires_ansible` is not a valid requirement specification
8
+
-`meta-runtime[unsupported-version]` - `requires_ansible` key must refer to a
9
+
currently supported version such as: >=2.14.0, >=2.15.0, >=2.16.0
10
+
-`meta-runtime[invalid-version]` - `requires_ansible` is not a valid
11
+
requirement specification
9
12
10
-
Please note that the linter will allow only a full version of Ansible such `2.16.0` and not allow their short form, like `2.16`. This is a safety measure
11
-
for asking authors to mention an explicit version that they tested with. Over the years we spotted multiple problems caused by the use of the short versions, users
12
-
ended up trying an outdated version that was never tested against by the collection maintainer.
13
+
Please note that the linter will allow only a full version of Ansible such
14
+
`2.16.0` and not allow their short form, like `2.16`. This is a safety measure
15
+
for asking authors to mention an explicit version that they tested with. Over
16
+
the years we spotted multiple problems caused by the use of the short versions,
17
+
users ended up trying an outdated version that was never tested against by the
18
+
collection maintainer.
13
19
14
20
## Problematic code
15
21
@@ -19,7 +25,6 @@ ended up trying an outdated version that was never tested against by the collect
19
25
requires_ansible: ">=2.9"
20
26
```
21
27
22
-
23
28
```yaml
24
29
# runtime.yml
25
30
---
@@ -33,3 +38,15 @@ requires_ansible: "2.15"
33
38
---
34
39
requires_ansible: ">=2.15.0"
35
40
```
41
+
42
+
## Configuration
43
+
44
+
In addition to the internal list of supported Ansible versions, users can
45
+
configure additional values. This allows those that want to maintain content
46
+
that requires a version of ansible-core that is already out of support.
47
+
48
+
```yaml
49
+
# Also recognize these versions of Ansible as supported:
"meta-runtime[unsupported-version]": f"'requires_ansible' key must refer to a currently supported version such as: {', '.join(supported_ansible_examples)}",
34
+
"meta-runtime[unsupported-version]": "'requires_ansible' key must refer to a currently supported version",
39
35
"meta-runtime[invalid-version]": "'requires_ansible' is not a valid requirement specification",
0 commit comments