{"action":"opened","number":5,"pull_request":{"url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/pulls/5","id":40034013,"html_url":"https://github.com/alphagov/ansible-playbook-docker_server/pull/5","diff_url":"https://github.com/alphagov/ansible-playbook-docker_server/pull/5.diff","patch_url":"https://github.com/alphagov/ansible-playbook-docker_server/pull/5.patch","issue_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/issues/5","number":5,"state":"open","locked":false,"title":"[#98748824] Fix docker version support","user":{"login":"actionjack","id":485400,"avatar_url":"https://avatars.githubusercontent.com/u/485400?v=3","gravatar_id":"","url":"https://api.github.com/users/actionjack","html_url":"https://github.com/actionjack","followers_url":"https://api.github.com/users/actionjack/followers","following_url":"https://api.github.com/users/actionjack/following{/other_user}","gists_url":"https://api.github.com/users/actionjack/gists{/gist_id}","starred_url":"https://api.github.com/users/actionjack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/actionjack/subscriptions","organizations_url":"https://api.github.com/users/actionjack/orgs","repos_url":"https://api.github.com/users/actionjack/repos","events_url":"https://api.github.com/users/actionjack/events{/privacy}","received_events_url":"https://api.github.com/users/actionjack/received_events","type":"User","site_admin":false},"body":"**What**\n\nDocker uses meta packages\n\n**Problem**\n\nDocker uses a meta package delivery method to encourage you to use the latest version of docker. What they do is name their packages by appending the version name to it with a hyphen rather than a version. The metapackage `lxc-docker` always points to the latest version.\n\nTo work around this I've refactored the code to make it handle the hyphen and be more extensible so you can mix and match it when using `with_items` e.g.\n\n```\n- name: Install support packages\n  apt: name=\"{{ item }}\"\n  with_items:\n    - foo\n    - \"{% if bar_version is defined %}bar={{ bar_version }}{% else %}bar{% endif %}\n    - \"{% if qux_version is defined %}qux-{{ qux_version }}{% else %}qux{% endif %}\n```\n\n**How to review this PR**\n\nThis PR should be reviewed in the context of the following narative:\n\n* I want to fix my disasterous oversight\n\n**How to test this PR**\n\nA vagrant box has been provided for testing, in order to use it simply:\n\n```\nvagrant up\n```\n\nThe site.yml can be updated with the relevant variables to test the new functionally e.g. `docker_version`, `docker_registry_host` and `docker_registry_port`.\n\n**Who should review this PR**\n\n* Any man, woman or honey badger (as long as it isn't anywhere near me) can review this PR, but let the honey badger do it, it's safer.","created_at":"2015-07-15T15:15:36Z","updated_at":"2015-07-15T15:15:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cedcc8595b9b0243160e033136dbb32dac2fd68e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/pulls/5/commits","review_comments_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/pulls/5/comments","review_comment_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/issues/5/comments","statuses_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/statuses/28c5b083cbbd18a73077a2118f4b5b00e7c6cd9e","head":{"label":"alphagov:98748824_fix_docker_version","ref":"98748824_fix_docker_version","sha":"28c5b083cbbd18a73077a2118f4b5b00e7c6cd9e","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":35875872,"name":"ansible-playbook-docker_server","full_name":"alphagov/ansible-playbook-docker_server","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/ansible-playbook-docker_server","description":"","fork":false,"url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server","forks_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/forks","keys_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/teams","hooks_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/hooks","issue_events_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/events","assignees_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/tags","blobs_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/languages","stargazers_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/stargazers","contributors_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/contributors","subscribers_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/subscribers","subscription_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/subscription","commits_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/merges","archive_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/downloads","issues_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/releases{/id}","created_at":"2015-05-19T10:36:15Z","updated_at":"2015-05-20T13:28:01Z","pushed_at":"2015-07-15T15:15:37Z","git_url":"git://github.com/alphagov/ansible-playbook-docker_server.git","ssh_url":"git@github.com:alphagov/ansible-playbook-docker_server.git","clone_url":"https://github.com/alphagov/ansible-playbook-docker_server.git","svn_url":"https://github.com/alphagov/ansible-playbook-docker_server","homepage":null,"size":284,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"ffed781bff85e4b000afc06e7b2730353801f88a","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":35875872,"name":"ansible-playbook-docker_server","full_name":"alphagov/ansible-playbook-docker_server","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/ansible-playbook-docker_server","description":"","fork":false,"url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server","forks_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/forks","keys_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/teams","hooks_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/hooks","issue_events_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/events","assignees_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/tags","blobs_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/languages","stargazers_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/stargazers","contributors_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/contributors","subscribers_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/subscribers","subscription_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/subscription","commits_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/merges","archive_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/downloads","issues_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/releases{/id}","created_at":"2015-05-19T10:36:15Z","updated_at":"2015-05-20T13:28:01Z","pushed_at":"2015-07-15T15:15:37Z","git_url":"git://github.com/alphagov/ansible-playbook-docker_server.git","ssh_url":"git@github.com:alphagov/ansible-playbook-docker_server.git","clone_url":"https://github.com/alphagov/ansible-playbook-docker_server.git","svn_url":"https://github.com/alphagov/ansible-playbook-docker_server","homepage":null,"size":284,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/pulls/5"},"html":{"href":"https://github.com/alphagov/ansible-playbook-docker_server/pull/5"},"issue":{"href":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/issues/5"},"comments":{"href":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/ansible-playbook-docker_server/statuses/28c5b083cbbd18a73077a2118f4b5b00e7c6cd9e"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":2,"changed_files":1}}