X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/2db5972d9f9604f3c3d7b8167fa3a740e6db7e03..317a044e552ea33471a5f1a9c4d9368a71368fc6:/cookbooks/postgresql/providers/user.rb diff --git a/cookbooks/postgresql/providers/user.rb b/cookbooks/postgresql/providers/user.rb index 5a1402d40..5df0f3847 100644 --- a/cookbooks/postgresql/providers/user.rb +++ b/cookbooks/postgresql/providers/user.rb @@ -17,6 +17,8 @@ # limitations under the License. # +require "shellwords" + use_inline_resources def load_current_resource @@ -35,7 +37,7 @@ def load_current_resource end action :create do - password = new_resource.password ? "ENCRYPTED PASSWORD '#{new_resource.password}'" : "" + password = new_resource.password ? "ENCRYPTED PASSWORD '#{new_resource.password.shellescape}'" : "" superuser = new_resource.superuser ? "SUPERUSER" : "NOSUPERUSER" createdb = new_resource.createdb ? "CREATEDB" : "NOCREATEDB" createrole = new_resource.createrole ? "CREATEROLE" : "NOCREATEROLE"