{"action":"created","issue":{"url":"https://api.github.com/repos/dayglojesus/managedmac/issues/74","labels_url":"https://api.github.com/repos/dayglojesus/managedmac/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/dayglojesus/managedmac/issues/74/comments","events_url":"https://api.github.com/repos/dayglojesus/managedmac/issues/74/events","html_url":"https://github.com/dayglojesus/managedmac/issues/74","id":60353536,"number":74,"title":"Cannot merge mobileconfig hashes","user":{"login":"groob","id":1526945,"avatar_url":"https://avatars.githubusercontent.com/u/1526945?v=3","gravatar_id":"","url":"https://api.github.com/users/groob","html_url":"https://github.com/groob","followers_url":"https://api.github.com/users/groob/followers","following_url":"https://api.github.com/users/groob/following{/other_user}","gists_url":"https://api.github.com/users/groob/gists{/gist_id}","starred_url":"https://api.github.com/users/groob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groob/subscriptions","organizations_url":"https://api.github.com/users/groob/orgs","repos_url":"https://api.github.com/users/groob/repos","events_url":"https://api.github.com/users/groob/events{/privacy}","received_events_url":"https://api.github.com/users/groob/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-09T14:46:01Z","updated_at":"2015-03-09T20:16:27Z","closed_at":null,"body":"If I have a hierarchy like \r\n\r\n```yaml\r\n:hierarchy:\r\n  - \"%{clientcert}\"\r\n  - \"%{operatingsystem}\"\r\n  - global\r\n```\r\n\r\nand would like to apply a profile to only a specific client, while having a default set of profiles for all my Macs. Only the profiles at the top of the hierarchy(clientcert) are applied, and anything in Darwin.yaml is ignored. \r\n\r\nHere's a sample: \r\n\r\n```yaml\r\n# Darwin.yaml\r\n---\r\nclasses:\r\n  - managedmac\r\nmanagedmac::mobileconfigs::defaults:\r\n  description:  'Installed by Puppet.'\r\n  organization: 'MyOrg'\r\nmanagedmac::mobileconfigs::payloads:\r\n  'com.apple.Safari':\r\n    content:\r\n      HomePage: 'http://google.com/'\r\n      NewWindowBehavior: '0'\r\n      DomainsToNeverSetUp:\r\n        - google.com\r\n      PayloadType: 'com.apple.Safari'\r\n    displayname: 'Managed Mac: Safari Settings'\r\n```\r\n\r\n```yaml\r\n# myclientcert.yaml\r\n---\r\n\r\nmanagedmac::mobileconfigs::payloads:\r\n 'com.google.Chrome':\r\n   content:\r\n     EnabledPlugins:\r\n       - 'Box Edit'\r\n     PayloadType: 'com.google.Chrome'\r\n   displayname: 'Managed Mac: Chrome Settings\r\n```\r\n\r\nOnly the payload for the clientcert is executed.\r\nI thought I could use the [hash merging](https://docs.puppetlabs.com/hiera/1/lookup_types.html#hash-merge) functionality to get this to work. Currently I can only apply profiles on a global level. \r\n\r\nNot sure if this is a bug or if I'm doing something wrong. "},"comment":{"url":"https://api.github.com/repos/dayglojesus/managedmac/issues/comments/77932854","html_url":"https://github.com/dayglojesus/managedmac/issues/74#issuecomment-77932854","issue_url":"https://api.github.com/repos/dayglojesus/managedmac/issues/74","id":77932854,"user":{"login":"groob","id":1526945,"avatar_url":"https://avatars.githubusercontent.com/u/1526945?v=3","gravatar_id":"","url":"https://api.github.com/users/groob","html_url":"https://github.com/groob","followers_url":"https://api.github.com/users/groob/followers","following_url":"https://api.github.com/users/groob/following{/other_user}","gists_url":"https://api.github.com/users/groob/gists{/gist_id}","starred_url":"https://api.github.com/users/groob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groob/subscriptions","organizations_url":"https://api.github.com/users/groob/orgs","repos_url":"https://api.github.com/users/groob/repos","events_url":"https://api.github.com/users/groob/events{/privacy}","received_events_url":"https://api.github.com/users/groob/received_events","type":"User","site_admin":false},"created_at":"2015-03-09T20:16:27Z","updated_at":"2015-03-09T20:16:27Z","body":"I assumed that ```merge_behavior: native``` wad a default, so I never set it. I use this with create_resources and hiera_hash to manage printers succesfuly:\r\nhttps://github.com/whitby/puppet-module-profile/blob/master/manifests/printers/printers.pp\r\n\r\nUnfortunately setting ```:merge_behavior: native``` in my hiera file had no effect. Looks like hiera_hash must be used. "}}