I'm trying to check what value Ansible pulls for the variable datadog_agent_api_key that is currently stored in Ansible Vault file inventory/common/vault-common-vars.yml.
ansible myhost.domain.com -i inventory/hosts.ini --connection=local -m debug -a var=datadog_agent_api_key --include_vars=inventory/common/vault-common-vars.yml
When I run it, I am getting the error
ansible: error: unrecognized arguments: --include_vars=inventory/common/vault-common-vars.yml
If the variable is not in Ansible Vault, it pulls the value correctly.
ansible myhost.domain.com -i inventory/hosts.ini --connection=local -m debug -a var=datadog_agent_system_probe_enabled
myhost.domain.com | SUCCESS => {
"datadog_agent_system_probe_enabled": true
What's the proper options to use or is there a different way to do this?