{"action":"created","issue":{"url":"https://api.github.com/repos/garethr/garethr-docker/issues/395","labels_url":"https://api.github.com/repos/garethr/garethr-docker/issues/395/labels{/name}","comments_url":"https://api.github.com/repos/garethr/garethr-docker/issues/395/comments","events_url":"https://api.github.com/repos/garethr/garethr-docker/issues/395/events","html_url":"https://github.com/garethr/garethr-docker/pull/395","id":122730235,"number":395,"title":"Add new parameters for docker daemon","user":{"login":"rchicoli","id":10183963,"avatar_url":"https://avatars.githubusercontent.com/u/10183963?v=3","gravatar_id":"","url":"https://api.github.com/users/rchicoli","html_url":"https://github.com/rchicoli","followers_url":"https://api.github.com/users/rchicoli/followers","following_url":"https://api.github.com/users/rchicoli/following{/other_user}","gists_url":"https://api.github.com/users/rchicoli/gists{/gist_id}","starred_url":"https://api.github.com/users/rchicoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rchicoli/subscriptions","organizations_url":"https://api.github.com/users/rchicoli/orgs","repos_url":"https://api.github.com/users/rchicoli/repos","events_url":"https://api.github.com/users/rchicoli/events{/privacy}","received_events_url":"https://api.github.com/users/rchicoli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-17T13:01:01Z","updated_at":"2016-01-18T15:27:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/garethr/garethr-docker/pulls/395","html_url":"https://github.com/garethr/garethr-docker/pull/395","diff_url":"https://github.com/garethr/garethr-docker/pull/395.diff","patch_url":"https://github.com/garethr/garethr-docker/pull/395.patch"},"body":"Implemented some options for docker daemon \r\n\r\n* bind the docker daemon to multiple ipaddress (changed string to array)\r\n* add ip_forward, iptables, ip_masq, fixed_cidr and bridge option\r\n\r\n```hiera\r\ndocker::tcp_bind:\r\n  - 'tcp://127.0.0.1:2375'\r\n  - \"tcp://%{::ipaddress}:2375\"\r\ndocker::ip_forward: false\r\ndocker::iptables: false\r\ndocker::ip_masq: false\r\ndocker::fixed_cidr: '10.10.1.0/24'\r\ndocker::bridge: 'br0'\r\ndocker::default_gateway: '10.10.0.1'\r\n```\r\n\r\nOPTIONS=\" -H tcp://127.0.0.1:2375 -H tcp://10.10.0.3:2375 --ip-masq=false --iptables=false --ip-forward=false --fixed-cidr 10.10.1.0/24 --default-gateway 10.10.0.1 --bridge br0\""},"comment":{"url":"https://api.github.com/repos/garethr/garethr-docker/issues/comments/172561069","html_url":"https://github.com/garethr/garethr-docker/pull/395#issuecomment-172561069","issue_url":"https://api.github.com/repos/garethr/garethr-docker/issues/395","id":172561069,"user":{"login":"garethr","id":2029,"avatar_url":"https://avatars.githubusercontent.com/u/2029?v=3","gravatar_id":"","url":"https://api.github.com/users/garethr","html_url":"https://github.com/garethr","followers_url":"https://api.github.com/users/garethr/followers","following_url":"https://api.github.com/users/garethr/following{/other_user}","gists_url":"https://api.github.com/users/garethr/gists{/gist_id}","starred_url":"https://api.github.com/users/garethr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garethr/subscriptions","organizations_url":"https://api.github.com/users/garethr/orgs","repos_url":"https://api.github.com/users/garethr/repos","events_url":"https://api.github.com/users/garethr/events{/privacy}","received_events_url":"https://api.github.com/users/garethr/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T15:27:47Z","updated_at":"2016-01-18T15:27:47Z","body":"Thanks @rchicoli, this looks great, one quick suggestion and one request.\r\n\r\nRather than break backwards compatibility with the change from a string to an array, it's probably worth calling `any2array` on the passed value. You can see an example of this in use here:\r\n\r\nhttps://github.com/garethr/garethr-docker/blob/543b66fd58676164f5a6f7aab99508b440777346/manifests/run.pp#L128\r\n\r\nThis maintains the ability to pass a string, but allows for passing an array, without having to change the template (which always gets an array).\r\n\r\nAlso, would it be possible to add some quick unit tests to verify the changes? You should find some other examples but if you have any questions I'm happy to help. The tests really help with ensuring future changes don't break things.\r\n\r\nThanks again."}}