Hello.
I don’t know what the recommended solution is for the issue you are facing, but in a local test the following sort of works. Suitable enough for your needs?
| _**Description**_ | _**Command**_|
| - | - |
| List all configurations|`ansible-config list`|
| Shows the current config file being used|`ansible-config view`|
| Shows the current settings being used|`ansible-config dump`|
| Search for a variable and its assigned value|`ansible-config dump` \| `grep GATHERING`|