Skip to content

Commit 974c54d

Browse files
sur5rssbarnea
andauthored
Allow dashes in legacy role namespaces (#3962)
Co-authored-by: Sorin Sbarnea <[email protected]>
1 parent 322cde1 commit 974c54d

File tree

2 files changed

+1
-16
lines changed
  • src/ansiblelint/schemas
  • test/schemas/negative_test/roles/meta_invalid_role_namespace/meta

2 files changed

+1
-16
lines changed

src/ansiblelint/schemas/meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@
512512
"namespace": {
513513
"markdownDescription": "Used by molecule and ansible-lint to compute FQRN for roles outside collections",
514514
"minLength": 2,
515-
"pattern": "^[a-z][a-z0-9_]+$",
515+
"pattern": "^[a-z][a-z0-9_-]+$",
516516
"title": "Namespace Name",
517517
"type": "string"
518518
},

test/schemas/negative_test/roles/meta_invalid_role_namespace/meta/main.yml.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@
1919
"failingKeyword": "then"
2020
},
2121
"schemaPath": "#/allOf/0/if"
22-
},
23-
{
24-
"instancePath": "/galaxy_info/namespace",
25-
"keyword": "pattern",
26-
"message": "must match pattern \"^[a-z][a-z0-9_]+$\"",
27-
"params": {
28-
"pattern": "^[a-z][a-z0-9_]+$"
29-
},
30-
"schemaPath": "#/properties/namespace/pattern"
3122
}
3223
]
3324
```
@@ -46,12 +37,6 @@ stdout:
4637
"path": "$.galaxy_info",
4738
"message": "'author' is a required property",
4839
"has_sub_errors": false
49-
},
50-
{
51-
"filename": "negative_test/roles/meta_invalid_role_namespace/meta/main.yml",
52-
"path": "$.galaxy_info.namespace",
53-
"message": "'foo-bar' does not match '^[a-z][a-z0-9_]+$'",
54-
"has_sub_errors": false
5540
}
5641
],
5742
"parse_errors": []

0 commit comments

Comments
 (0)