@utoddl, thanks for your [somewhat snarky] response. I apologize for not including the full error. I added organizations to the input_tag as you suggested but still receive the same error. Here is the full error:
TASK [infra.controller_configuration.filetree_create : Validating arguments against arg spec 'main' - An Ansible Role to create a local file tree of objects existing in Controller] ******************
fatal: [localhost]: FAILED! => {"argument_errors": ["organization_filter. Supported parameters include: controller_configuration_async_delay, controller_configuration_async_retries, controller_configuration_filetree_create_secure_logging, controller_configuration_secure_logging, controller_hostname, controller_oauthtoken, controller_password, controller_state, controller_username, controller_validate_certs, input_tag, output_path, query_controller_api_max_objects."], "argument_spec_data": {"controller_configuration_async_delay": {"default": 1, "description": "This variable sets delay between retries across all roles as a default.", "required": false}, "controller_configuration_async_retries": {"default": 30, "description": "This variable sets number of retries across all roles as a default.", "required": false}, "controller_configuration_filetree_create_secure_logging": {"default": false, "description": "Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere.", "required": false, "type": "bool"}, "controller_configuration_secure_logging": {"default": false, "description": "This variable enables secure logging across all roles as a default.", "required": false, "type": "bool"}, "controller_hostname": {"default": "None", "description": "URL to the Ansible Controller Server.", "required": false, "type": "str"}, "controller_oauthtoken": {"default": "None", "description": "Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified.", "required": false, "type": "str"}, "controller_password": {"default": "None", "description": "Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified.", "required": false, "type": "str"}, "controller_state": {"default": "present", "description": "The state all objects will take unless overridden by object default", "required": false, "type": "str"}, "controller_username": {"default": "None", "description": "Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified.", "required": false, "type": "str"}, "controller_validate_certs": {"default": true, "description": "Whether or not to validate the Ansible Controller Server's SSL certificate.", "required": false, "type": "str"}, "input_tag": {"default": ["all"], "description": "The tags which are applied to the 'sub-roles'. If 'all' is in the list (the default value) then all roles will be called.", "elements": "str", "required": false, "type": "list"}, "output_path": {"default": "/tmp/filetree_output", "description": "The path to the output directory where all the generated `yaml` files with the corresponding Objects as code will be written to.", "required": false, "type": "str"}, "query_controller_api_max_objects": {"default": 10000, "description": "Maximum number of objects to return from the list. If a list view returns more an max_objects an exception will be raised", "required": false, "type": "int"}}, "changed": false, "msg": "Validation of arguments failed:\norganization_filter. Supported parameters include: controller_configuration_async_delay, controller_configuration_async_retries, controller_configuration_filetree_create_secure_logging, controller_configuration_secure_logging, controller_hostname, controller_oauthtoken, controller_password, controller_state, controller_username, controller_validate_certs, input_tag, output_path, query_controller_api_max_objects.", "validate_args_context": {"argument_spec_name": "main", "name": "filetree_create", "path": "/home/dave/.ansible/collections/ansible_collections/infra/controller_configuration/roles/filetree_create", "type": "role"}}
The relevant part is this:
“Validation of arguments failed:\norganization_filter. Supported parameters include: controller_configuration_async_delay controller_configuration_async_retries, controller_configuration_filetree_create_secure_logging, controller_configuration_secure_logging, controller_hostname, controller_oauthtoken, controller_password, controller_state, controller_username, controller_validate_certs, input_tag, output_path, query_controller_api_max_objects.”
organization_filter is not on the list of valid arguments, yet it is clearly listed as a Role Variable in the documentation.
Comparing the list of Role Variables to the valid arguments, I noticed that flatten_output is also not supported and remembered there was an example of flatten_output where it is passed in the -e command line parameter in the documentation. I was able to run the following successfully:
ansible-playbook export.yml -e '{organization_filter: "Infrastructure Operations"}'
Forgive my ignorance as I am fairly new to using these modules, but is this common practice for vars to be passed outside of the call to the role (in -e) and not allowed within the call (in the playbook roles: as vars) or is this a bug?