{"action":"closed","issue":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-docker/issues/15","repository_url":"https://api.github.com/repos/puppetlabs/puppetlabs-docker","labels_url":"https://api.github.com/repos/puppetlabs/puppetlabs-docker/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-docker/issues/15/comments","events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-docker/issues/15/events","html_url":"https://github.com/puppetlabs/puppetlabs-docker/issues/15","id":265218251,"number":15,"title":"docker::registry is called every time","user":{"login":"Jeoffreybauvin","id":701928,"avatar_url":"https://avatars1.githubusercontent.com/u/701928?v=4","gravatar_id":"","url":"https://api.github.com/users/Jeoffreybauvin","html_url":"https://github.com/Jeoffreybauvin","followers_url":"https://api.github.com/users/Jeoffreybauvin/followers","following_url":"https://api.github.com/users/Jeoffreybauvin/following{/other_user}","gists_url":"https://api.github.com/users/Jeoffreybauvin/gists{/gist_id}","starred_url":"https://api.github.com/users/Jeoffreybauvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jeoffreybauvin/subscriptions","organizations_url":"https://api.github.com/users/Jeoffreybauvin/orgs","repos_url":"https://api.github.com/users/Jeoffreybauvin/repos","events_url":"https://api.github.com/users/Jeoffreybauvin/events{/privacy}","received_events_url":"https://api.github.com/users/Jeoffreybauvin/received_events","type":"User","site_admin":false},"labels":[{"id":649480317,"url":"https://api.github.com/repos/puppetlabs/puppetlabs-docker/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-10-13T09:04:49Z","updated_at":"2017-11-15T10:19:51Z","closed_at":"2017-11-15T10:19:51Z","author_association":"NONE","body":"Hi there,\r\n\r\nWhen using docker::registry, this resource is called at every catalogue.\r\n\r\nA little hack : \r\n\r\n```  $auth_string = base64('encode', \"${username}:${password}\")\r\n  if $receipt {\r\n    # no - with pw_hash\r\n    $local_user_strip = regsubst($local_user, '-', '', 'G')\r\n\r\n    file { \"/root/.docker/registry-auth-puppet_receipt_${server}_${local_user}\":\r\n      ensure  => $ensure,\r\n      content => pw_hash(\"${title}${auth_environment}${auth_cmd}${local_user}\", 'SHA-512', $local_user_strip),\r\n      notify  => Exec[\"${title} auth\"],\r\n    }\r\n  }\r\n\r\n  exec { \"${title} auth\":\r\n    environment => $auth_environment,\r\n    command     => $auth_cmd,\r\n    user        => $local_user,\r\n    cwd         => '/root',\r\n    path        => ['/bin', '/usr/bin'],\r\n    timeout     => 0,\r\n    refreshonly => $receipt,\r\n  }```\r\n"}}
{"actor":{"display_login":"scotty-c"}}