How to resolve the error "AnsibleUndefinedVariable: 'ansible_all_ipv6_addresses' is undefined" while installing the Ansible Automation Platform 2.x ?

Solution Verified - Updated -

Environment

  • Red Hat® Ansible Automation Platform 2.x

Issue

  • While installing Ansible Automation Platform, the installer fails with the following error:

    fatal: [localhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'ansible_all_ipv6_addresses' is undefined"}
    

Resolution

  • To bypass the error, rerun the installer with the following extra variable as follows:

    ./setup.sh -e ansible_all_ipv6_addresses=[] 
    

Diagnostic Steps

  • The following error can be seen while running the AAP installer:

    Traceback (most recent call last):
    File "/usr/lib/python3.9/site-packages/anisble/plugins/action/template.py", line 141, in run
    resultant = templar.do_template(template_data, preserve_trailing_newlines=True, escape_backslashes=False)
    File "/usr/lib/python3.9/site-packages/anisble/_init_.py", line 1021, in do_template
     raise AnsibleUndefinedvariable(e, orig_exec=e)
    anisble.errors.AnsibleUndefinedvariable: 'anisble_all_ipv6_addresses' is undefine. 'ansible_all_ipv6_address' is undefined
    fatal: [host_fqdn]: FAILED! => {
    "changed: false,
    "msg": "AnsibleUndefinedVariable: 'ansible_all_ipv6_addresses' is undefined. 'ansible_all_ipv6_addresses' is undefined"
    }
    

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments