{
“msg”: “The task includes an option with an undefined variable. The error was: ‘AD_Admin_username’ is undefined\n\nThe error appears to have been in ‘/var/lib/awx/projects/_8__ad_realm/realm_dev_env.yml’: line 33, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Join system to AD and add the computer object in the Linux OU\n ^ here\n”,
“_ansible_no_log”: false
}
any idea why the credentials aren’t getting passed to the playbook?
name: Join system to AD and add the computer object in the Linux OU
expect:
command: /usr/sbin/realm join domain.com --user=‘{{ AD_Admin_username }}’ --computer-ou=“OU=Linux,OU=Servers,OU=Machines,DC=domain,DC=com”
responses:
Password for *: ‘{{ AD_Admin_password }}’
Instead of adding the vars to the template, you need to create a credential of the custom credential type you’re defining and add that credential to the template.