)]}'
{"lib/puppet/provider/policy_rcd/policy_rcd.rb":[{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"6b329425babb387ccbdfefac485a46f050597af7","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    if check_policy_rcd"},{"line_number":34,"context_line":"      line \u003d \"# THIS FILE MANAGED BY PUPPET\\n#!/bin/bash\\n[[ \\\"$1\\\" \u003d\u003d \\\"#{@resource[:service]}\\\" ]] \u0026\u0026 exit #{@resource[:set_code]}\\n\""},{"line_number":35,"context_line":"    else"},{"line_number":36,"context_line":"      line \u003d \"[[ \\\"$1\\\" \u003d\u003d \\\"#{@resource[:service]}\\\" ]] \u0026\u0026 exit #{@resource[:set_code]}\\n\""},{"line_number":37,"context_line":"    end"},{"line_number":38,"context_line":"    policy.puts(line)"},{"line_number":39,"context_line":"    policy.close"}],"source_content_type":"text/x-ruby","patch_set":2,"id":"7aa08908_05fd01b1","line":36,"range":{"start_line":36,"start_character":32,"end_line":36,"end_character":50},"updated":"2016-06-17 11:49:21.000000000","message":"We should support multiple services at once. The template does this today I believe. So service could be an array","commit_id":"85e91ce875ab94912901ae6d617dd3c67751f756"},{"author":{"_account_id":8318,"name":"Matthew J Black","email":"mjblack@gmail.com","username":"mjblack"},"change_message_id":"1907a26f3fbb4bfd1a83efc5c1a9b050c7143a0c","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    if check_policy_rcd"},{"line_number":34,"context_line":"      line \u003d \"# THIS FILE MANAGED BY PUPPET\\n#!/bin/bash\\n[[ \\\"$1\\\" \u003d\u003d \\\"#{@resource[:service]}\\\" ]] \u0026\u0026 exit #{@resource[:set_code]}\\n\""},{"line_number":35,"context_line":"    else"},{"line_number":36,"context_line":"      line \u003d \"[[ \\\"$1\\\" \u003d\u003d \\\"#{@resource[:service]}\\\" ]] \u0026\u0026 exit #{@resource[:set_code]}\\n\""},{"line_number":37,"context_line":"    end"},{"line_number":38,"context_line":"    policy.puts(line)"},{"line_number":39,"context_line":"    policy.close"}],"source_content_type":"text/x-ruby","patch_set":2,"id":"7aa08908_1bc1e42f","line":36,"range":{"start_line":36,"start_character":32,"end_line":36,"end_character":50},"in_reply_to":"7aa08908_05fd01b1","updated":"2016-06-17 12:33:33.000000000","message":"Yes, there might be a need to do similar for other api services in the future.","commit_id":"85e91ce875ab94912901ae6d617dd3c67751f756"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"078304125682bfbb4358a95696cdbd9418716122","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    if check_policy_rcd"},{"line_number":34,"context_line":"      line \u003d \"# THIS FILE MANAGED BY PUPPET\\n#!/bin/bash\\n[[ \\\"$1\\\" \u003d\u003d \\\"#{@resource[:service]}\\\" ]] \u0026\u0026 exit #{@resource[:set_code]}\\n\""},{"line_number":35,"context_line":"    else"},{"line_number":36,"context_line":"      line \u003d \"[[ \\\"$1\\\" \u003d\u003d \\\"#{@resource[:service]}\\\" ]] \u0026\u0026 exit #{@resource[:set_code]}\\n\""},{"line_number":37,"context_line":"    end"},{"line_number":38,"context_line":"    policy.puts(line)"},{"line_number":39,"context_line":"    policy.close"}],"source_content_type":"text/x-ruby","patch_set":2,"id":"7aa08908_d93c8431","line":36,"range":{"start_line":36,"start_character":32,"end_line":36,"end_character":50},"in_reply_to":"7aa08908_1bc1e42f","updated":"2016-06-17 13:05:37.000000000","message":"Provider can be called with different name and it will manage many services.","commit_id":"85e91ce875ab94912901ae6d617dd3c67751f756"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"eb4b8e21944f4ca178d6f2c4a1b13229b89c935e","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    if check_policy_rcd"},{"line_number":34,"context_line":"      line \u003d \"# THIS FILE MANAGED BY PUPPET\\n#!/bin/bash\\n[[ \\\"$1\\\" \u003d\u003d \\\"#{@resource[:service]}\\\" ]] \u0026\u0026 exit #{@resource[:set_code]}\\n\""},{"line_number":35,"context_line":"    else"},{"line_number":36,"context_line":"      line \u003d \"[[ \\\"$1\\\" \u003d\u003d \\\"#{@resource[:service]}\\\" ]] \u0026\u0026 exit #{@resource[:set_code]}\\n\""},{"line_number":37,"context_line":"    end"},{"line_number":38,"context_line":"    policy.puts(line)"},{"line_number":39,"context_line":"    policy.close"}],"source_content_type":"text/x-ruby","patch_set":2,"id":"7aa08908_f96d0033","line":36,"range":{"start_line":36,"start_character":32,"end_line":36,"end_character":50},"in_reply_to":"7aa08908_1bc1e42f","updated":"2016-06-17 13:07:20.000000000","message":"So it was pointed out to me that this is an append. So something like...\n\npolicy_rd { \u0027keystone\u0027: service \u003d\u003e\u0027keystone\u0027 } \npolicy_rd { \u0027httpd\u0027: service \u003d\u003e \u0027httpd\u0027 }\n\nwould be how you\u0027d specify multiple services","commit_id":"85e91ce875ab94912901ae6d617dd3c67751f756"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"43313700fb58dc7d1bbd82ab22240a6b9457074a","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    if check_policy_rcd"},{"line_number":34,"context_line":"      line \u003d \"# THIS FILE MANAGED BY PUPPET\\n#!/bin/bash\\n[[ \\\"$1\\\" \u003d\u003d \\\"#{@resource[:service]}\\\" ]] \u0026\u0026 exit #{@resource[:set_code]}\\n\""},{"line_number":35,"context_line":"    else"},{"line_number":36,"context_line":"      line \u003d \"[[ \\\"$1\\\" \u003d\u003d \\\"#{@resource[:service]}\\\" ]] \u0026\u0026 exit #{@resource[:set_code]}\\n\""},{"line_number":37,"context_line":"    end"},{"line_number":38,"context_line":"    policy.puts(line)"},{"line_number":39,"context_line":"    policy.close"}],"source_content_type":"text/x-ruby","patch_set":2,"id":"7aa08908_0f17da45","line":36,"range":{"start_line":36,"start_character":32,"end_line":36,"end_character":50},"in_reply_to":"7aa08908_993cbce2","updated":"2016-06-17 13:27:25.000000000","message":"yea it would be nice to use the name as the service default","commit_id":"85e91ce875ab94912901ae6d617dd3c67751f756"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"70ea78f39964812b648e713357f0a12ef3a73b24","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    if check_policy_rcd"},{"line_number":34,"context_line":"      line \u003d \"# THIS FILE MANAGED BY PUPPET\\n#!/bin/bash\\n[[ \\\"$1\\\" \u003d\u003d \\\"#{@resource[:service]}\\\" ]] \u0026\u0026 exit #{@resource[:set_code]}\\n\""},{"line_number":35,"context_line":"    else"},{"line_number":36,"context_line":"      line \u003d \"[[ \\\"$1\\\" \u003d\u003d \\\"#{@resource[:service]}\\\" ]] \u0026\u0026 exit #{@resource[:set_code]}\\n\""},{"line_number":37,"context_line":"    end"},{"line_number":38,"context_line":"    policy.puts(line)"},{"line_number":39,"context_line":"    policy.close"}],"source_content_type":"text/x-ruby","patch_set":2,"id":"7aa08908_993cbce2","line":36,"range":{"start_line":36,"start_character":32,"end_line":36,"end_character":50},"in_reply_to":"7aa08908_f96d0033","updated":"2016-06-17 13:10:49.000000000","message":"As an option we can do next:\n\nmake property :service default to :name\n\nand then just for example:\n\npolicy_rd { [ .. ] :\n  set_code \u003d\u003e \u0027101\u0027\n}","commit_id":"85e91ce875ab94912901ae6d617dd3c67751f756"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"be2d51ba8c8532c5323e40362634d423701dde00","unresolved":false,"context_lines":[{"line_number":25,"context_line":"  end"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"  def exists?"},{"line_number":28,"context_line":"    if check_policy_rcd"},{"line_number":29,"context_line":"      file_lines.each do |line|"},{"line_number":30,"context_line":"        unless line \u003d~ /#{@resource[:service]}/"},{"line_number":31,"context_line":"          next"}],"source_content_type":"text/x-ruby","patch_set":4,"id":"7aa08908_e6f55083","line":28,"updated":"2016-06-17 15:53:19.000000000","message":"Should we only do any of the update items if osfamily \u003d\u003d \u0027Debian\u0027 and make it a noop if run under any other os?","commit_id":"1bcab792966058f04faf5c68f8f63b6422ba963d"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"64835d321fa7a398397e539735788d846ce10dc5","unresolved":false,"context_lines":[{"line_number":25,"context_line":"  end"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"  def exists?"},{"line_number":28,"context_line":"    if check_policy_rcd"},{"line_number":29,"context_line":"      file_lines.each do |line|"},{"line_number":30,"context_line":"        unless line \u003d~ /#{@resource[:service]}/"},{"line_number":31,"context_line":"          next"}],"source_content_type":"text/x-ruby","patch_set":4,"id":"7aa08908_a6e98881","line":28,"in_reply_to":"7aa08908_e6f55083","updated":"2016-06-17 15:55:14.000000000","message":"Yes, we should. Will add.","commit_id":"1bcab792966058f04faf5c68f8f63b6422ba963d"},{"author":{"_account_id":7732,"name":"IvanBerezovskiy","email":"ivan.berezovskii@gmail.com","username":"iberezovskiy"},"change_message_id":"3435342187a133677323ac8cbb42465d92825f8a","unresolved":false,"context_lines":[{"line_number":27,"context_line":"  def exists?"},{"line_number":28,"context_line":"    if check_policy_rcd"},{"line_number":29,"context_line":"      file_lines.each do |line|"},{"line_number":30,"context_line":"        unless line \u003d~ /#{@resource[:service]}/"},{"line_number":31,"context_line":"          next"},{"line_number":32,"context_line":"        end"},{"line_number":33,"context_line":"        return true"}],"source_content_type":"text/x-ruby","patch_set":4,"id":"7aa08908_c6ef741b","line":30,"updated":"2016-06-17 15:46:22.000000000","message":"This matching should be improved. we can have situation with\nservice \u003d heat-api and service \u003d heat-api-cfn. They both are match for \u0027heat-api\u0027","commit_id":"1bcab792966058f04faf5c68f8f63b6422ba963d"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"bf924295af6929ccbb23848b2475d9d89cbcc3a2","unresolved":false,"context_lines":[{"line_number":27,"context_line":"  def exists?"},{"line_number":28,"context_line":"    if check_policy_rcd"},{"line_number":29,"context_line":"      file_lines.each do |line|"},{"line_number":30,"context_line":"        unless line \u003d~ /#{@resource[:service]}/"},{"line_number":31,"context_line":"          next"},{"line_number":32,"context_line":"        end"},{"line_number":33,"context_line":"        return true"}],"source_content_type":"text/x-ruby","patch_set":4,"id":"7aa08908_e648b02f","line":30,"in_reply_to":"7aa08908_c6ef741b","updated":"2016-06-17 15:47:21.000000000","message":"Right, will do","commit_id":"1bcab792966058f04faf5c68f8f63b6422ba963d"},{"author":{"_account_id":7732,"name":"IvanBerezovskiy","email":"ivan.berezovskii@gmail.com","username":"iberezovskiy"},"change_message_id":"849c2e84e0d70c6eee6f19ed480b5daba255ac1c","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    else"},{"line_number":43,"context_line":"      header \u003d \"\""},{"line_number":44,"context_line":"    end"},{"line_number":45,"context_line":"    lines \u003d [ header ]"},{"line_number":46,"context_line":"    lines \u003c\u003c \"[[ \\\"$1\\\" \u003d\u003d \\\"#{@resource[:service]}\\\" ]] \u0026\u0026 exit #{@resource[:set_code]}\\n\""},{"line_number":47,"context_line":"    policy \u003d File.open(policy_rcd, \u0027a+\u0027)"},{"line_number":48,"context_line":"    policy.puts(lines)"}],"source_content_type":"text/x-ruby","patch_set":4,"id":"7aa08908_86056cc3","line":45,"updated":"2016-06-17 15:51:17.000000000","message":"in case of header\u003d\"\" it will add empty line to the file. Probably we don\u0027t want this","commit_id":"1bcab792966058f04faf5c68f8f63b6422ba963d"}],"lib/puppet/type/policy_rcd.rb":[{"author":{"_account_id":7732,"name":"IvanBerezovskiy","email":"ivan.berezovskii@gmail.com","username":"iberezovskiy"},"change_message_id":"849c2e84e0d70c6eee6f19ed480b5daba255ac1c","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"  newproperty(:set_code) do"},{"line_number":14,"context_line":"    defaultto(\u0027101\u0027)"},{"line_number":15,"context_line":"    newvalues(/^\\d{1,3}$/)"},{"line_number":16,"context_line":"  end"},{"line_number":17,"context_line":"end"}],"source_content_type":"text/x-ruby","patch_set":4,"id":"7aa08908_a69a2860","line":15,"updated":"2016-06-17 15:51:17.000000000","message":"just a suggestion: it lets to set \u0027000\u0027 as exit code. probably we can forbid to set \u00270\u0027 at first position.","commit_id":"1bcab792966058f04faf5c68f8f63b6422ba963d"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"64835d321fa7a398397e539735788d846ce10dc5","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"  newproperty(:set_code) do"},{"line_number":14,"context_line":"    defaultto(\u0027101\u0027)"},{"line_number":15,"context_line":"    newvalues(/^\\d{1,3}$/)"},{"line_number":16,"context_line":"  end"},{"line_number":17,"context_line":"end"}],"source_content_type":"text/x-ruby","patch_set":4,"id":"7aa08908_e63c3031","line":15,"in_reply_to":"7aa08908_a69a2860","updated":"2016-06-17 15:55:14.000000000","message":"according to policy-rc.d docs, we can set code 0\n\nhttps://people.debian.org/~hmh/invokerc.d-policyrc.d-specification.txt\n\nactually we can improve regexp here too, yes.","commit_id":"1bcab792966058f04faf5c68f8f63b6422ba963d"}],"manifests/policyrcd.pp":[{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"034af5f75951bfa90af73025c7fb98f4d680da44","unresolved":false,"context_lines":[{"line_number":36,"context_line":"  $services"},{"line_number":37,"context_line":"  $packages      \u003d undef,"},{"line_number":38,"context_line":"  $once_disabled \u003d false,"},{"line_number":39,"context_line":") {"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"  validate_array($services)"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-puppet","patch_set":1,"id":"7aa08908_c70ca444","line":39,"updated":"2016-06-17 10:24:59.000000000","message":"possibly we can farther improve this for adding services in any time, not only once for catalog.","commit_id":"ccc2c59f1589b149c58d96135459e2f05ef33540"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"6b329425babb387ccbdfefac485a46f050597af7","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    }"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    if $once_disabled {"},{"line_number":55,"context_line":"      ensure_resource(\u0027exec\u0027, \u0027remove-policy-rc.d\u0027, {"},{"line_number":56,"context_line":"        path    \u003d\u003e [ \u0027/sbin\u0027, \u0027/bin\u0027, \u0027/usr/bin\u0027, \u0027/usr/sbin\u0027 ],"},{"line_number":57,"context_line":"        command \u003d\u003e \"rm -f ${policyrc_file}\","},{"line_number":58,"context_line":"        onlyif  \u003d\u003e \"test -f ${policyrc_file}\","}],"source_content_type":"text/x-puppet","patch_set":2,"id":"7aa08908_a5222d52","line":55,"updated":"2016-06-17 11:49:21.000000000","message":"Is there any harm in just leaving it in place going forward?","commit_id":"85e91ce875ab94912901ae6d617dd3c67751f756"},{"author":{"_account_id":8318,"name":"Matthew J Black","email":"mjblack@gmail.com","username":"mjblack"},"change_message_id":"1907a26f3fbb4bfd1a83efc5c1a9b050c7143a0c","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    }"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    if $once_disabled {"},{"line_number":55,"context_line":"      ensure_resource(\u0027exec\u0027, \u0027remove-policy-rc.d\u0027, {"},{"line_number":56,"context_line":"        path    \u003d\u003e [ \u0027/sbin\u0027, \u0027/bin\u0027, \u0027/usr/bin\u0027, \u0027/usr/sbin\u0027 ],"},{"line_number":57,"context_line":"        command \u003d\u003e \"rm -f ${policyrc_file}\","},{"line_number":58,"context_line":"        onlyif  \u003d\u003e \"test -f ${policyrc_file}\","}],"source_content_type":"text/x-puppet","patch_set":2,"id":"7aa08908_9b7f94de","line":55,"in_reply_to":"7aa08908_a5222d52","updated":"2016-06-17 12:33:33.000000000","message":"It should not cause any harm, it would just prevent the defined services from auto-starting but I believe this is to mimic redhat packages, not autostart services, but the issue I see is that it will fail idempotent because it will create the policy-rc.d and then remove it on every run.","commit_id":"85e91ce875ab94912901ae6d617dd3c67751f756"}]}
