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
^@ ↩︎