How to specify a host variable as the SSH target

Hi all, I am having difficulty finding information on how to tell Ansible Automation Platform to use one of the host variables as the SSH target.

So for example, I have a host in an inventory in Ansible Automation Platform like this:

The host name is ‘glccd-alsip-dc-sw2’. The variables associated with this host are the following:

{
  "ip_address": "10.10.10.10",
  "manufacturer": "Cisco Systems, Inc.",
  "name": "glccd-alsip-dc-sw2",
  "short_description": "Cisco IOS Software ......."
}

How do I tell Ansible Automation Platform to not try and resolve ‘glccd-alsip-dc-sw2’ to an IP address but to use the IP address in the host variable? Not every host has an valid A-record, and so when AAP tries to resolve the host name, it fails. Is this possible to do before execution time or at runtime? And how can it be done?

You just need to set the ssh connection plugin configuration to know that ip_address is how to reach your target, one way:

ansible_ssh_host: '{{ip_address}}'

Marking this as the solution as specifying ‘ansible_host:’ with the IP address fixed it. Thanks!