Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
Fixed console & stats user; added non-sensitive auth related vars to …
Browse files Browse the repository at this point in the history
…role defaults (and updated README accordingly)
  • Loading branch information
Charlie Orford committed Feb 20, 2019
1 parent 884de6a commit 7712fa4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@

Ansible role to compile and install pgbouncer (a reverse proxy for postgresql).

The following vars should be set in a separate var file and encrypted with Ansible vault (or similar):
The password for `$pgbouncer_auth_user` should be set in a separate var file and encrypted with Ansible vault (or similar):

```
pgbouncer_auth_user: "pgbouncer"
pgbouncer_auth_password: "md5 hash of password prefixed with the string: md5"
pgbouncer_auth_type: "md5"
pgbouncer_auth_file: "/etc/pgbouncer/auth.conf"
pgbouncer_auth_query: "SELECT uname, phash from user_lookup($1)"
pgbouncer_auth_password: "md5 hash of password, prefixed with the string: md5"
```

Databases for pgbouncer to connect to are specified as a list using the pgbouncer_databases var. Example:
Expand Down
14 changes: 9 additions & 5 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@ pgbouncer_workspace: "/usr/local/src"
pgbouncer_reinstall: no
pgbouncer_conf_file: "/etc/pgbouncer/pgbouncer.ini"
pgbouncer_pid_file: "/run/pgbouncer/pgbouncer.pid"
pgbouncer_log_file: "" # By default, logs go to syslog
pgbouncer_log_file: "" # By default logs go to syslog
pgbouncer_install_path: "/usr/local"
pgbouncer_socket_path: "/run/pgbouncer"
pgbouncer_libevent_path: "/usr/lib" # Leave blank if you want the ./configure script try and find it itself
pgbouncer_run_as_user: "pgbouncer"
pgbouncer_run_as_group: "pgbouncer"
pgbouncer_port: 6432
pgbouncer_listen_address: "*"
pgbouncer_admin_users: ["postgres"]
pgbouncer_stats_users: ["postgres"]
pgbouncer_run_as_user: "pgbouncer"
pgbouncer_run_as_group: "pgbouncer"
pgbouncer_admin_users: ["pgbouncer"]
pgbouncer_stats_users: ["pgbouncer"]
pgbouncer_auth_user: "pgbouncer"
pgbouncer_auth_type: "md5" # Note: at the moment only the md5 auth type is supported
pgbouncer_auth_file: "/etc/pgbouncer/auth.conf"
pgbouncer_auth_query: "SELECT uname, phash from user_lookup($1)" # See README for more info
pgbouncer_pool_mode: "transaction"
pgbouncer_default_client_encoding: "UNICODE"
pgbouncer_max_client_conn: 800
Expand Down

0 comments on commit 7712fa4

Please sign in to comment.