{"action":"created","issue":{"url":"https://api.github.com/repos/jsok/puppet-vault/issues/42","repository_url":"https://api.github.com/repos/jsok/puppet-vault","labels_url":"https://api.github.com/repos/jsok/puppet-vault/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/jsok/puppet-vault/issues/42/comments","events_url":"https://api.github.com/repos/jsok/puppet-vault/issues/42/events","html_url":"https://github.com/jsok/puppet-vault/pull/42","id":179805998,"number":42,"title":"Refactoring of module.","user":{"login":"crayfishx","id":837815,"avatar_url":"https://avatars.githubusercontent.com/u/837815?v=3","gravatar_id":"","url":"https://api.github.com/users/crayfishx","html_url":"https://github.com/crayfishx","followers_url":"https://api.github.com/users/crayfishx/followers","following_url":"https://api.github.com/users/crayfishx/following{/other_user}","gists_url":"https://api.github.com/users/crayfishx/gists{/gist_id}","starred_url":"https://api.github.com/users/crayfishx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crayfishx/subscriptions","organizations_url":"https://api.github.com/users/crayfishx/orgs","repos_url":"https://api.github.com/users/crayfishx/repos","events_url":"https://api.github.com/users/crayfishx/events{/privacy}","received_events_url":"https://api.github.com/users/crayfishx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-28T15:26:55Z","updated_at":"2016-09-29T07:52:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jsok/puppet-vault/pulls/42","html_url":"https://github.com/jsok/puppet-vault/pull/42","diff_url":"https://github.com/jsok/puppet-vault/pull/42.diff","patch_url":"https://github.com/jsok/puppet-vault/pull/42.patch"},"body":"\r\n## Summary\r\n\r\nI've done a fair bit of refactoring to this module that I'd like to merge upstream in the hope of a next major release.  It's quite a large change so I've detailed as much as I can below.....\r\n\r\n## Changes\r\n\r\n### Replacement of `config_hash` (API change)\r\n\r\nThis PR removes the generic `config_hash` attribute and replaces it with more fine grained controls by adding the following attributes to the `vault` class\r\n\r\n* `backend` (Hash)\r\n* `listener` (Hash)\r\n* `ha_backend` (Hash, optional)\r\n* `telemetry` (Hash, optional)\r\n* `disable_mlock` (Boolean, optional)\r\n* `disable_cache` (Boolean, optional)\r\n* `default_lease_ttl` (String, optional)\r\n* `max_lease_ttl` (String, optional)\r\n* `disable_mlock` (Boolean, optional)\r\n\r\nThis has many benefits, especially when used with Hiera...  For example to disable mlock in my dev environment I would have to re-create the entire hash at the level in the hierarchy, with this change you can just set `vault::disable_mlock: true` at the appropriate place.   This also improves validation, and makes the module more understandable.\r\n\r\nThis is an API breaking change.  If you would prefer to maintain a backwardly compatible version of the module and deprecate the `config_hash` variable over the course of several releases, this would be fairly easy to implement.   I could put `config_hash` back in with a default of `undef` and put a conditional around the building of `vault::config::config_hash` to use this value if it's supplied instead of the new attributes, and document the attribute as deprecated.    I have not done this as I don't feel a 0.x module needs to worry too much about deprecating things over multiple releases - but I'm happy to add it if requested.\r\n\r\n### Allow for package installations (#36)\r\n\r\nAs this was quite a major refactor I decided to pull in the PR from @miso321 adding package installations into this PR since there have been no objections to it, and it's currently unmerged.\r\n\r\nCloses #36 \r\n\r\n### Replaced `nanliu/staging` for `puppet/archive`\r\n\r\nThis is a modernisation, `nanliu/staging` is currently not under active feature development, the advised replacement for it is `puppet/archive`.\r\n\r\n### JSON file now has line breaks.\r\n\r\nThe `vault_sorted_json` function now gives a prettier output with line breaks and indenting by using `JSON.pretty_generate`\r\n\r\n### Other changes\r\n\r\n* Changed the `scope.lookupvar()` notation in templates to `scope[]`, this is more best practice\r\n* Updated spec tests (rspec passes for me)\r\n* `puppetlabs/stdlib` dependancy set to 4.3 (for the `delete_undef_values` function\r\n* Added documentation to the README for all class parameters\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jsok/puppet-vault/issues/comments/250396105","html_url":"https://github.com/jsok/puppet-vault/pull/42#issuecomment-250396105","issue_url":"https://api.github.com/repos/jsok/puppet-vault/issues/42","id":250396105,"user":{"login":"crayfishx","id":837815,"avatar_url":"https://avatars.githubusercontent.com/u/837815?v=3","gravatar_id":"","url":"https://api.github.com/users/crayfishx","html_url":"https://github.com/crayfishx","followers_url":"https://api.github.com/users/crayfishx/followers","following_url":"https://api.github.com/users/crayfishx/following{/other_user}","gists_url":"https://api.github.com/users/crayfishx/gists{/gist_id}","starred_url":"https://api.github.com/users/crayfishx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crayfishx/subscriptions","organizations_url":"https://api.github.com/users/crayfishx/orgs","repos_url":"https://api.github.com/users/crayfishx/repos","events_url":"https://api.github.com/users/crayfishx/events{/privacy}","received_events_url":"https://api.github.com/users/crayfishx/received_events","type":"User","site_admin":false},"created_at":"2016-09-29T07:52:24Z","updated_at":"2016-09-29T07:52:24Z","body":"@jsok I've added `extra_config` as an optional hash and reverted stdlib back to 4.2"}}
{"actor":{"display_login":"crayfishx"}}