{"action":"opened","number":1707,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1707","id":60124639,"html_url":"https://github.com/ansible/ansible-modules-extras/pull/1707","diff_url":"https://github.com/ansible/ansible-modules-extras/pull/1707.diff","patch_url":"https://github.com/ansible/ansible-modules-extras/pull/1707.patch","issue_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1707","number":1707,"state":"open","locked":false,"title":"Add dict support to osx_defaults","user":{"login":"claco","id":20319,"avatar_url":"https://avatars.githubusercontent.com/u/20319?v=3","gravatar_id":"","url":"https://api.github.com/users/claco","html_url":"https://github.com/claco","followers_url":"https://api.github.com/users/claco/followers","following_url":"https://api.github.com/users/claco/following{/other_user}","gists_url":"https://api.github.com/users/claco/gists{/gist_id}","starred_url":"https://api.github.com/users/claco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claco/subscriptions","organizations_url":"https://api.github.com/users/claco/orgs","repos_url":"https://api.github.com/users/claco/repos","events_url":"https://api.github.com/users/claco/events{/privacy}","received_events_url":"https://api.github.com/users/claco/received_events","type":"User","site_admin":false},"body":"##### Issue Type:\r\n\r\n - Feature Idea\r\n\r\n##### Plugin Name:\r\n\r\nosx_defaults\r\n\r\n##### Ansible Version:\r\n\r\n```\r\nansible 2.0.0.2\r\n  config file = /Users/claco/Projects/claco.network/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\n##### Ansible Configuration:\r\n\r\n```\r\n[defaults]\r\nask_sudo_pass = True\r\nfact_caching = jsonfile\r\nfact_caching_connection = ./facts\r\nfact_caching_timeout = 86400\r\nhash_behaviour: merge\r\ninventory = ./inventory\r\nroles_path = ./roles\r\nvault_password_file = ~/.ansible_vault_password\r\n```\r\n\r\n##### Environment:\r\n\r\nOSX El Cap 10.11\r\n\r\n##### Summary:\r\n\r\nThe osx_defaults module doesn't yet support dict and dict-add methods for changing/adding defaults that are contained within values that are dicts.\r\n\r\n##### Steps To Reproduce:\r\n\r\nAs an example, I'm configuring defaults for SizeUp on a new install. Many of the settings are container in dicts for each group of key commands. This command, for example, configures the combo code for the 'move window to lower left' command:\r\n\r\n```\r\ndefaults write com.irradiatedsoftware.SizeUp. \"Lower Left\" -dict-add ComboCode 125\r\n```\r\nBecause there is no dict/dict-add support, I have to fall back to using bash/shell commands rather than using the module.\r\n\r\n##### Expected Results:\r\n\r\nAs an example, I would have expected to see something like this:\r\n\r\n```\r\n- name: Add Default Lower Left\r\n  osx_defaults: domain=com.irradiatedsoftware.SizeUp key=\"Lower Left\", value: {ComboCode: 125} state=present\r\n```\r\n\r\n##### Actual Results:\r\n\r\nWhat actually happened?\r\n\r\n```\r\nfailed: [mqr13tg8wl] => (item={u'type': u'dict', u'key': u'Lower Left', u'value': u'ComboFlags 126'}) => {\"failed\": tr\r\nue, \"item\": {\"key\": \"Lower Left\", \"type\": \"dict\", \"value\": \"ComboFlags 126\"}, \"msg\": \"value of type must be one of: ar\r\nray,bool,boolean,date,float,int,integer,string, got: dict\"}\r\n```\r\n\r\nIssue: #1705","created_at":"2016-02-22T04:38:41Z","updated_at":"2016-02-22T04:38:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1707/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1707/comments","review_comment_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1707/comments","statuses_url":"https://api.github.com/repos/ansible/ansible-modules-extras/statuses/6398947510e4b6593ae5d22834e27fd3a52eb285","head":{"label":"claco:osx-defaults-add-dict-support","ref":"osx-defaults-add-dict-support","sha":"6398947510e4b6593ae5d22834e27fd3a52eb285","user":{"login":"claco","id":20319,"avatar_url":"https://avatars.githubusercontent.com/u/20319?v=3","gravatar_id":"","url":"https://api.github.com/users/claco","html_url":"https://github.com/claco","followers_url":"https://api.github.com/users/claco/followers","following_url":"https://api.github.com/users/claco/following{/other_user}","gists_url":"https://api.github.com/users/claco/gists{/gist_id}","starred_url":"https://api.github.com/users/claco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claco/subscriptions","organizations_url":"https://api.github.com/users/claco/orgs","repos_url":"https://api.github.com/users/claco/repos","events_url":"https://api.github.com/users/claco/events{/privacy}","received_events_url":"https://api.github.com/users/claco/received_events","type":"User","site_admin":false},"repo":{"id":52247201,"name":"ansible-modules-extras","full_name":"claco/ansible-modules-extras","owner":{"login":"claco","id":20319,"avatar_url":"https://avatars.githubusercontent.com/u/20319?v=3","gravatar_id":"","url":"https://api.github.com/users/claco","html_url":"https://github.com/claco","followers_url":"https://api.github.com/users/claco/followers","following_url":"https://api.github.com/users/claco/following{/other_user}","gists_url":"https://api.github.com/users/claco/gists{/gist_id}","starred_url":"https://api.github.com/users/claco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claco/subscriptions","organizations_url":"https://api.github.com/users/claco/orgs","repos_url":"https://api.github.com/users/claco/repos","events_url":"https://api.github.com/users/claco/events{/privacy}","received_events_url":"https://api.github.com/users/claco/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/claco/ansible-modules-extras","description":"Ansible extra modules - these modules ship with ansible","fork":true,"url":"https://api.github.com/repos/claco/ansible-modules-extras","forks_url":"https://api.github.com/repos/claco/ansible-modules-extras/forks","keys_url":"https://api.github.com/repos/claco/ansible-modules-extras/keys{/key_id}","collaborators_url":"https://api.github.com/repos/claco/ansible-modules-extras/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/claco/ansible-modules-extras/teams","hooks_url":"https://api.github.com/repos/claco/ansible-modules-extras/hooks","issue_events_url":"https://api.github.com/repos/claco/ansible-modules-extras/issues/events{/number}","events_url":"https://api.github.com/repos/claco/ansible-modules-extras/events","assignees_url":"https://api.github.com/repos/claco/ansible-modules-extras/assignees{/user}","branches_url":"https://api.github.com/repos/claco/ansible-modules-extras/branches{/branch}","tags_url":"https://api.github.com/repos/claco/ansible-modules-extras/tags","blobs_url":"https://api.github.com/repos/claco/ansible-modules-extras/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/claco/ansible-modules-extras/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/claco/ansible-modules-extras/git/refs{/sha}","trees_url":"https://api.github.com/repos/claco/ansible-modules-extras/git/trees{/sha}","statuses_url":"https://api.github.com/repos/claco/ansible-modules-extras/statuses/{sha}","languages_url":"https://api.github.com/repos/claco/ansible-modules-extras/languages","stargazers_url":"https://api.github.com/repos/claco/ansible-modules-extras/stargazers","contributors_url":"https://api.github.com/repos/claco/ansible-modules-extras/contributors","subscribers_url":"https://api.github.com/repos/claco/ansible-modules-extras/subscribers","subscription_url":"https://api.github.com/repos/claco/ansible-modules-extras/subscription","commits_url":"https://api.github.com/repos/claco/ansible-modules-extras/commits{/sha}","git_commits_url":"https://api.github.com/repos/claco/ansible-modules-extras/git/commits{/sha}","comments_url":"https://api.github.com/repos/claco/ansible-modules-extras/comments{/number}","issue_comment_url":"https://api.github.com/repos/claco/ansible-modules-extras/issues/comments{/number}","contents_url":"https://api.github.com/repos/claco/ansible-modules-extras/contents/{+path}","compare_url":"https://api.github.com/repos/claco/ansible-modules-extras/compare/{base}...{head}","merges_url":"https://api.github.com/repos/claco/ansible-modules-extras/merges","archive_url":"https://api.github.com/repos/claco/ansible-modules-extras/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/claco/ansible-modules-extras/downloads","issues_url":"https://api.github.com/repos/claco/ansible-modules-extras/issues{/number}","pulls_url":"https://api.github.com/repos/claco/ansible-modules-extras/pulls{/number}","milestones_url":"https://api.github.com/repos/claco/ansible-modules-extras/milestones{/number}","notifications_url":"https://api.github.com/repos/claco/ansible-modules-extras/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/claco/ansible-modules-extras/labels{/name}","releases_url":"https://api.github.com/repos/claco/ansible-modules-extras/releases{/id}","deployments_url":"https://api.github.com/repos/claco/ansible-modules-extras/deployments","created_at":"2016-02-22T04:31:30Z","updated_at":"2016-02-22T04:31:34Z","pushed_at":"2016-02-22T04:33:13Z","git_url":"git://github.com/claco/ansible-modules-extras.git","ssh_url":"git@github.com:claco/ansible-modules-extras.git","clone_url":"https://github.com/claco/ansible-modules-extras.git","svn_url":"https://github.com/claco/ansible-modules-extras","homepage":"","size":6543,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"ansible:devel","ref":"devel","sha":"001d3b581a329bfcbc513985bee1ee52a879486d","user":{"login":"ansible","id":1507452,"avatar_url":"https://avatars.githubusercontent.com/u/1507452?v=3","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"repo":{"id":24474138,"name":"ansible-modules-extras","full_name":"ansible/ansible-modules-extras","owner":{"login":"ansible","id":1507452,"avatar_url":"https://avatars.githubusercontent.com/u/1507452?v=3","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ansible/ansible-modules-extras","description":"Ansible extra modules - these modules ship with ansible","fork":false,"url":"https://api.github.com/repos/ansible/ansible-modules-extras","forks_url":"https://api.github.com/repos/ansible/ansible-modules-extras/forks","keys_url":"https://api.github.com/repos/ansible/ansible-modules-extras/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ansible/ansible-modules-extras/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ansible/ansible-modules-extras/teams","hooks_url":"https://api.github.com/repos/ansible/ansible-modules-extras/hooks","issue_events_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/events{/number}","events_url":"https://api.github.com/repos/ansible/ansible-modules-extras/events","assignees_url":"https://api.github.com/repos/ansible/ansible-modules-extras/assignees{/user}","branches_url":"https://api.github.com/repos/ansible/ansible-modules-extras/branches{/branch}","tags_url":"https://api.github.com/repos/ansible/ansible-modules-extras/tags","blobs_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/refs{/sha}","trees_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ansible/ansible-modules-extras/statuses/{sha}","languages_url":"https://api.github.com/repos/ansible/ansible-modules-extras/languages","stargazers_url":"https://api.github.com/repos/ansible/ansible-modules-extras/stargazers","contributors_url":"https://api.github.com/repos/ansible/ansible-modules-extras/contributors","subscribers_url":"https://api.github.com/repos/ansible/ansible-modules-extras/subscribers","subscription_url":"https://api.github.com/repos/ansible/ansible-modules-extras/subscription","commits_url":"https://api.github.com/repos/ansible/ansible-modules-extras/commits{/sha}","git_commits_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/commits{/sha}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/comments{/number}","issue_comment_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/comments{/number}","contents_url":"https://api.github.com/repos/ansible/ansible-modules-extras/contents/{+path}","compare_url":"https://api.github.com/repos/ansible/ansible-modules-extras/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ansible/ansible-modules-extras/merges","archive_url":"https://api.github.com/repos/ansible/ansible-modules-extras/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ansible/ansible-modules-extras/downloads","issues_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues{/number}","pulls_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls{/number}","milestones_url":"https://api.github.com/repos/ansible/ansible-modules-extras/milestones{/number}","notifications_url":"https://api.github.com/repos/ansible/ansible-modules-extras/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ansible/ansible-modules-extras/labels{/name}","releases_url":"https://api.github.com/repos/ansible/ansible-modules-extras/releases{/id}","deployments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/deployments","created_at":"2014-09-25T20:28:42Z","updated_at":"2016-02-22T01:50:59Z","pushed_at":"2016-02-22T01:32:30Z","git_url":"git://github.com/ansible/ansible-modules-extras.git","ssh_url":"git@github.com:ansible/ansible-modules-extras.git","clone_url":"https://github.com/ansible/ansible-modules-extras.git","svn_url":"https://github.com/ansible/ansible-modules-extras","homepage":"","size":11900,"stargazers_count":477,"watchers_count":477,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":971,"mirror_url":null,"open_issues_count":509,"forks":971,"open_issues":509,"watchers":477,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1707"},"html":{"href":"https://github.com/ansible/ansible-modules-extras/pull/1707"},"issue":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1707"},"comments":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1707/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1707/comments"},"review_comment":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1707/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/statuses/6398947510e4b6593ae5d22834e27fd3a52eb285"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":84,"deletions":5,"changed_files":1}}