diff --git a/src/ansiblelint/schemas/role-arg-spec.json b/src/ansiblelint/schemas/role-arg-spec.json index 368df6ead7..fcb78a7fdf 100644 --- a/src/ansiblelint/schemas/role-arg-spec.json +++ b/src/ansiblelint/schemas/role-arg-spec.json @@ -1,5 +1,73 @@ { "$defs": { + "attribute": { + "additionalProperties": false, + "properties": { + "description": { + "description": "Detailed explanation of what this attribute does. It should be written in full sentences.", + "oneOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ] + }, + "details": { + "description": "Detailed explanation of what this attribute does. It should be written in full sentences.", + "oneOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ] + }, + "membership": { + "oneOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ] + }, + "platform": { + "oneOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ] + }, + "support": { + "enum": ["full", "partial", "none", "N/A"], + "type": "string" + }, + "version_added": { + "type": "string" + } + }, + "required": ["description", "support"], + "title": "Attribute" + }, "datatype": { "enum": [ "str", @@ -38,6 +106,12 @@ "entry_point": { "additionalProperties": false, "properties": { + "attributes": { + "additionalProperties": { + "$ref": "#/$defs/attribute" + }, + "type": "object" + }, "author": { "oneOf": [ { diff --git a/test/schemas/test/roles/foo/meta/argument_specs.yml b/test/schemas/test/roles/foo/meta/argument_specs.yml index 128eab62c8..57e8dc69e7 100644 --- a/test/schemas/test/roles/foo/meta/argument_specs.yml +++ b/test/schemas/test/roles/foo/meta/argument_specs.yml @@ -89,6 +89,22 @@ argument_specs: author: - Foobar Baz - Bert Foo + attributes: + idempotent: + description: Whether the role is idempotent. + support: full + check_mode: + description: + - Whether the role supports check mode. + support: partial + details: + - Does not work if O(my_app_int=5). + version_added: 1.2.0 + action_group: + description: + - Use C(group/foo.bar.baz) in C(module_defaults) to set authentication options for the C(foo.bar) modules used by this role. + support: full + membership: foo.bar.baz options: my_app_int: type: "int"