Advertisement
Guest User

Untitled

a guest
Apr 24th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. exec { "Set default privileges fot TABLES":
  2. command => "export PGPASSWORD=$rds_role_admin_password && psql -h sitlrds -U $rds_role_admin -d $rds_database -c 'ALTER DEFAULT PRIVILEGES FOR ROLE lsradmin IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES to lsrpublic;'",
  3. unless => "export PGPASSWORD=$rds_role_public_password && psql -h sitlrds -U $rds_role_public -d $rds_database -c 'select * from passportreport;'",
  4. }
  5.  
  6. exec { "Set default privileges fot SEQUENCES":
  7. command => "export PGPASSWORD=$rds_role_admin_password && psql -h sitlrds -U $rds_role_admin -d $rds_database -c 'ALTER DEFAULT PRIVILEGES FOR ROLE lsradmin IN SCHEMA public GRANT ALL PRIVILEGES ON SEQUENCES to lsrpublic;'",
  8. unless => "export PGPASSWORD=$rds_role_public_password && psql -h sitlrds -U $rds_role_public -d $rds_database -c 'select * from passportreport;'",
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement