Skip to content

Instantly share code, notes, and snippets.

@mr

mr/init.sls Secret

Created May 28, 2014 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mr/ae9902f3002cfa149c7b to your computer and use it in GitHub Desktop.
Save mr/ae9902f3002cfa149c7b to your computer and use it in GitHub Desktop.
Salt postgres problems
db:
postgres_database.present:
- encoding: UTF-8
- user: postgres
- owner: myuser
[INFO ] Running state [db] at time 11:17:13.823203
[INFO ] Executing state postgres_database.present for db
[INFO ] Executing command '/usr/bin/psql --no-align --no-readline --dbname postgres -v datestyle=ISO,MDY -c \'COPY (SELECT datname as "Name", pga.rolname as "Owner", pg_encoding_to_char(encoding) as "Encoding", datcollate as "Collate", datctype as "Ctype", datacl as "Access p
rivileges", spcname as "Tablespace" FROM pg_database pgd, pg_roles pga, pg_tablespace pgts WHERE pga.oid = pgd.datdba AND pgts.oid = pgd.dattablespace) TO STDOUT WITH CSV HEADER\'' as user 'postgres' in directory '/var/lib/pgsql'
[INFO ] stdout: Name,Owner,Encoding,Collate,Ctype,Access privileges,Tablespace
template1,postgres,UTF8,en_US.UTF-8,en_US.UTF-8,"{=c/postgres,postgres=CTc/postgres}",pg_default
template0,postgres,UTF8,en_US.UTF-8,en_US.UTF-8,"{=c/postgres,postgres=CTc/postgres}",pg_default
postgres,postgres,UTF8,en_US.UTF-8,en_US.UTF-8,,pg_default
db,myuser,UTF8,en_US.UTF-8,en_US.UTF-8,,pg_default
[ERROR ] Database db has wrong parameters which couldn't be changed on fly.
[INFO ] Completed state [db] at time 11:17:13.941882
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment