# AWX Configuration as Code Help

**URL:** <https://forum.ansible.com/t/awx-configuration-as-code-help/38467>\
**Category:** AWX Project\
**Tags:** awx, galaxy-ng\
**Created:** [September 26, 2023, 3:39pm UTC](https://forum.ansible.com/t/awx-configuration-as-code-help/38467 "2023-09-26T15:39:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arguy](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/arguy/32/2114_2.png) [@arguy](https://forum.ansible.com/u/arguy)\
**Post date:** [September 26, 2023, 3:39pm UTC](https://forum.ansible.com/t/awx-configuration-as-code-help/38467/1 "2023-09-26T15:39:30Z")

</div>

I’m trying to get started with configuration as code. At first i started writing playbooks to reference awx.awx to add my items and that worked, but i really like the idea of the collections where these values are all provided in config files. I’m having a few issues wrapping my head around how to properly use this collection to keep my desired state.

I am attempting to use the below collection to do this.  
[https://beta-galaxy.ansible.com/ui/repo/published/infra/controller\_configuration/](https://beta-galaxy.ansible.com/ui/repo/published/infra/controller_configuration/)

I have downloaded the “[tests](https://github.com/redhat-cop/controller_configuration/tree/devel/tests)” folder and placed into a git repo.

I have started to replace all the values for the yml files in the /config/ directory, but after looking through some of the other folders, not sure im using it all correctly.

1. How would I run a playbook against my current environment to populate the export of these values like i see in [\configs\_export\_model]([https://github.com/redhat-cop/controller\_configuration/tree/devel/tests/configs\_export\_model](https://github.com/redhat-cop/controller_configuration/tree/devel/tests/configs_export_model))?

2. How do i set a separate playbook to run drop-diff when i run it ad hoc to delete anything that was added in the GUI and not in my config directory? Or run a diff check where it will print out any objects on the API that arent in the config directories?

3. I see the format of the below folder.

“[tests/automatetheautomation/orgs\_vars/ExampleOrg/env/prod/controller\_settings.d/app-examples](https://github.com/redhat-cop/controller_configuration/tree/devel/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples)”  
Am i able to make subfolders in the [/configs/](https://github.com/redhat-cop/controller_configuration/tree/devel/tests/configs) directory and separate files for separate objects like the example in the “[automatetheautomationfolder](https://github.com/redhat-cop/controller_configuration/tree/devel/tests/automatetheautomation)”.

Thanks to anyone who can explain any of these. The docs are great, but because it looks like there’s so many options, i’m having trouble finding where to start
