X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/d58406548fa7bfd73c181dc9c97081e87e3f7d20..93462ef55b24b71edbcdbe0f1694f5ae483c6c6c:/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"