# awx.awx.tower-settings and variable YAML keys

**URL:** <https://forum.ansible.com/t/awx-awx-tower-settings-and-variable-yaml-keys/34231>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [November 24, 2020, 1:39pm UTC](https://forum.ansible.com/t/awx-awx-tower-settings-and-variable-yaml-keys/34231 "2020-11-24T13:39:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![howardjones](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/howardjones/32/4169_2.png) [@howardjones](https://forum.ansible.com/u/howardjones)\
**Post date:** [November 24, 2020, 1:39pm UTC](https://forum.ansible.com/t/awx-awx-tower-settings-and-variable-yaml-keys/34231/1 "2020-11-24T13:39:53Z")

</div>

I’m writing a playbook to reproduce our awx installation, and part of that is configuring AD auth. However, part of that is the user mapping, which needs the organisation name as a key. Everywhere else, I’ve managed to keep that in the vars file, and out of the playbook, but Jinja2/ansible won’t process a dict key for substitution. What did anyone else do in this situation?

- name: Configure AD Auth  
awx.awx.tower\_settings:  
settings:  
SOCIAL\_AUTH\_AZUREAD\_OAUTH2\_KEY: “{{ sp\_client\_id }}”  
SOCIAL\_AUTH\_AZUREAD\_OAUTH2\_SECRET: “{{ awx\_ad\_auth\_token }}”  
SOCIAL\_AUTH\_AZUREAD\_OAUTH2\_ORGANIZATION\_MAP:  
“{{ awx.org\_name }}”:  
users: “/\[1\].\*?@company\.com$/”  
remove\_users: True

* * *

1. ^@
