# Data model differences within infra.controller\_configuratio between roles filetree\_create, filetree\_read & dispatch and the module controller\_export\_diff

**URL:** <https://forum.ansible.com/t/data-model-differences-within-infra-controller-configuratio-between-roles-filetree-create-filetree-read-dispatch-and-the-module-controller-export-diff/44805>\
**Category:** Get Help\
**Tags:** infra-config-as-code, aap\
**Created:** [November 7, 2025, 4:43am UTC](https://forum.ansible.com/t/data-model-differences-within-infra-controller-configuratio-between-roles-filetree-create-filetree-read-dispatch-and-the-module-controller-export-diff/44805 "2025-11-07T04:43:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamroddo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/iamroddo/32/321_2.png) [@iamroddo](https://forum.ansible.com/u/iamroddo)\
**Post date:** [November 7, 2025, 4:43am UTC](https://forum.ansible.com/t/data-model-differences-within-infra-controller-configuratio-between-roles-filetree-create-filetree-read-dispatch-and-the-module-controller-export-diff/44805/1 "2025-11-07T04:43:57Z")

</div>

I am experimenting with using a combination of the roles `filetree_create`, `filetree_read` and `dispatch` in combination with the module `controller_export_diff` in the collection `infra.controller_configuration` (v3.2.0) to configure AAP controller 2.4.

The idea behind this combination is to extract the current configuration from a controller that has been mainly configured via the GUI and convert the configuration procedure to “config-as-code”. To use the modified output from `filetree_create` as a base for that in the future “config-as-code” process. the output from I wanted to include the module `controller_export_diff` in order to include within the “config-as-code” process to enable that process to remove objects from AAP when removed from the code.

Unfortunately I hit a snag that the roles `filetree_create`, `filetree_read` and `dispatch` deal with a slightly different data model than the module `controller_export_diff`. In anything where `organization` attribute is set, in the roles it is defined as key/value `organization: <name of organization>` while in the module it’s a nested dictionary `organization.name: <name of organization>`. The same thing is for `inventory` in `inventory_sources`, `credential_type` in `credentials`, `project` in `job_templates`.

I was thinking to convert the data models but this is a lot of conversion if I want to use the `dispatch` role. I’m wondering whether there is a better way of doing this?
