Add a 'ansible-role' cli
This is split off from the #44983 role arg spec pr.
Apply a role to a host list, similar to 'ansible localhost -m ping'
For example using test1 role in test/integration/targets/validate_arg_spec
will use the 'default' role arg specs from meta/arg_specs.yml
$ ansible-role localhost -r test1
Apply a role to a host list, similar to 'ansible localhost -m ping' And also use the ansible-role '-a' key=value args Let ansible-role -A specify which arg spec def to use. And fixup ansible-role to work with the current params for validate_arg_spec. The meta/arg_specs.yml will have a dict. Each key in the dict is the name of an arg spec, and the value is the arg spec definition. By default, the 'default' arg spec will be used unless otherwise specified. Only ways to specify the arg spec name at the moment are: - the ansible-role -A/--arg-spec-name cli options - change DEFAULT_ARG_SPEC_NAME in config For example using the test1 role in test/integration/targets/validate_arg_spec $ cd test/integration/targets/validate_arg_spec # will use the 'default' role arg specs from meta/arg_specs.yml $ ansible-role localhost -r test1 # will use the 'simple_preset' role arg spec from meta/arg_specs.yml $ ansible-role localhost -r test1 -A simple_preset Stop creating a validation task in ansible-role Role loading does it generally now, so ansible-role doesnt need to special case it. Add ansible-role to a doc index to fix ansible-test