# osx\_defaults missing a data type

**URL:** <https://forum.ansible.com/t/osx-defaults-missing-a-data-type/24238>\
**Category:** Ansible Developer\
**Created:** [April 18, 2017, 1:01pm UTC](https://forum.ansible.com/t/osx-defaults-missing-a-data-type/24238 "2017-04-18T13:01:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adrian\_Wallaschek](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@Adrian\_Wallaschek](https://forum.ansible.com/u/Adrian_Wallaschek)\
**Post date:** [April 18, 2017, 1:01pm UTC](https://forum.ansible.com/t/osx-defaults-missing-a-data-type/24238/1 "2017-04-18T13:01:20Z")

</div>

Hi!

I just came across a missing datatype in this area: dict.

Test-case: I tried to add a directory to the user-folders for Desktop wallpapers.

`

$ defaults read com.apple.systempreferences DSKDesktopPrefPane

{

UserFolderPaths = (

“/Users/prefect/Box Sync/Wallpapers”

);

}

`

So as you can see from the defaults-command, there is a dict within the value of DSKDesktopPrefPane.

Now looking at the docs of osx\_defaults, these is an array type, but no dict type.

Is this feature just missing and the key is not accessible? Or ist there a straightforward syntax to enter the hierarchy of the dict?

I tried:

`

- osx\_defaults:

domain: com.apple.systempreferences

key: DKSDesktopPrefPane

type: array

value:

UserFolderPaths:

- /dudel

tags:

- wallpaper

- osx\_defaults

`

So I just tried to be ignorant and feed a dict into the task. With “type: array” this results in an error (not-an-array) with type string this results in:

`DKSDesktopPrefPane = "{'UserFolderPaths': ['/dudel']}";`

Being a silbling of the other setting, so the primary key for the settings seems to be a combo of type and key.

In all cases … it simply does not work.

Any clue?

Thanks in advance,

Adrian
