Skip to content

Commit

Permalink
Add missing become_method plugins to the schema
Browse files Browse the repository at this point in the history
  • Loading branch information
audgirka committed May 23, 2023
1 parent cf5c031 commit 2bc6051
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .config/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ pkgs
placefolder
pluggy
pluginmanager
pmrun
podman
portchannel
prerun
Expand Down Expand Up @@ -313,6 +314,7 @@ sdist
sdists
sectionauthor
seealso
sesu
setenv
setuptools
shortdesc
Expand All @@ -339,6 +341,7 @@ subschema
subschemas
substrs
subtest
sudosu
superfences
supervisorctl
swdepot
Expand Down
2 changes: 1 addition & 1 deletion src/ansiblelint/schemas/__store__.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"url": "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/changelog.json"
},
"execution-environment": {
"etag": "fb343322c706fe2a571adf4f33e01a4bc86dc1d4ec548c22911eb116ccb355de",
"etag": "f3abb1716134227ccd667607840dd7bdebfd02a8980603df031282126dc78264",
"url": "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/execution-environment.json"
},
"galaxy": {
Expand Down
9 changes: 8 additions & 1 deletion src/ansiblelint/schemas/ansible.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,19 @@
"dzdo",
"ksu",
"doas",
"machinectl"
"machinectl",
"pmrun",
"sesu",
"sudosu"
],
"type": "string"
},
{
"$ref": "#/$defs/full-jinja"
},
{
"pattern": "^[A-Z][a-z][0-9]._$",
"type": "string"
}
],
"title": "Become Method"
Expand Down
9 changes: 8 additions & 1 deletion src/ansiblelint/schemas/playbook.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,19 @@
"dzdo",
"ksu",
"doas",
"machinectl"
"machinectl",
"pmrun",
"sesu",
"sudosu"
],
"type": "string"
},
{
"$ref": "#/$defs/full-jinja"
},
{
"pattern": "^[A-Z][a-z][0-9]._$",
"type": "string"
}
],
"title": "Become Method"
Expand Down
9 changes: 8 additions & 1 deletion src/ansiblelint/schemas/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,19 @@
"dzdo",
"ksu",
"doas",
"machinectl"
"machinectl",
"pmrun",
"sesu",
"sudosu"
],
"type": "string"
},
{
"$ref": "#/$defs/full-jinja"
},
{
"pattern": "^[A-Z][a-z][0-9]._$",
"type": "string"
}
],
"title": "Become Method"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
"dzdo",
"ksu",
"doas",
"machinectl"
"machinectl",
"pmrun",
"sesu",
"sudosu"
]
},
"schemaPath": "#/oneOf/0/enum"
Expand All @@ -39,6 +42,15 @@
},
"schemaPath": "#/$defs/full-jinja/pattern"
},
{
"instancePath": "/0/become_method",
"keyword": "pattern",
"message": "must match pattern \"^[A-Z][a-z][0-9]._$\"",
"params": {
"pattern": "^[A-Z][a-z][0-9]._$"
},
"schemaPath": "#/oneOf/2/pattern"
},
{
"instancePath": "/0/become_method",
"keyword": "oneOf",
Expand All @@ -62,7 +74,10 @@
"dzdo",
"ksu",
"doas",
"machinectl"
"machinectl",
"pmrun",
"sesu",
"sudosu"
]
},
"schemaPath": "#/oneOf/0/enum"
Expand All @@ -76,6 +91,15 @@
},
"schemaPath": "#/$defs/full-jinja/pattern"
},
{
"instancePath": "/0/become_method",
"keyword": "pattern",
"message": "must match pattern \"^[A-Z][a-z][0-9]._$\"",
"params": {
"pattern": "^[A-Z][a-z][0-9]._$"
},
"schemaPath": "#/oneOf/2/pattern"
},
{
"instancePath": "/0/become_method",
"keyword": "oneOf",
Expand Down Expand Up @@ -119,12 +143,16 @@ stdout:
},
{
"path": "$[0].become_method",
"message": "'sudo_var' is not one of ['sudo', 'su', 'pbrun', 'pfexec', 'runas', 'dzdo', 'ksu', 'doas', 'machinectl']"
"message": "'sudo_var' is not one of ['sudo', 'su', 'pbrun', 'pfexec', 'runas', 'dzdo', 'ksu', 'doas', 'machinectl', 'pmrun', 'sesu', 'sudosu']"
},
{
"path": "$[0].become_method",
"message": "'sudo_var' does not match '^\\\\{[\\\\{%](.|[\\r\\n])*[\\\\}%]\\\\}$'"
},
{
"path": "$[0].become_method",
"message": "'sudo_var' does not match '^[A-Z][a-z][0-9]._$'"
},
{
"path": "$[0]",
"message": "'block' is a required property"
Expand All @@ -135,11 +163,15 @@ stdout:
},
{
"path": "$[0].become_method",
"message": "'sudo_var' is not one of ['sudo', 'su', 'pbrun', 'pfexec', 'runas', 'dzdo', 'ksu', 'doas', 'machinectl']"
"message": "'sudo_var' is not one of ['sudo', 'su', 'pbrun', 'pfexec', 'runas', 'dzdo', 'ksu', 'doas', 'machinectl', 'pmrun', 'sesu', 'sudosu']"
},
{
"path": "$[0].become_method",
"message": "'sudo_var' does not match '^\\\\{[\\\\{%](.|[\\r\\n])*[\\\\}%]\\\\}$'"
},
{
"path": "$[0].become_method",
"message": "'sudo_var' does not match '^[A-Z][a-z][0-9]._$'"
}
]
}
Expand Down

0 comments on commit 2bc6051

Please sign in to comment.