Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Commit

Permalink
Issue geerlingguy#146: Fix PostgreSQL db var and bytea_output issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
geerlingguy authored and kekkis committed Feb 23, 2017
1 parent a729ab7 commit fdf110e
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 6 deletions.
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,27 @@ env:
DRUPALVM_DIR: /var/www/drupalvm
matrix:
# Defaults - Ubuntu 16.04.
- distro: ubuntu1604
- type: defaults
distro: ubuntu1604
init: /sbin/init
run_opts: "--privileged"
# Nginx and Drush make file test - Ubuntu 16.04.
- distro: ubuntu1604
- type: nginx-drush-make
distro: ubuntu1604
init: /sbin/init
run_opts: "--privileged"
local_config: tests/ubuntu-16-nginx.config.yml
config_dir: /var/www/drupalvm/config
# PostgreSQL - Ubuntu 16.04.
- distro: ubuntu1604
- type: postgresql
distro: ubuntu1604
init: /sbin/init
run_opts: "--privileged"
local_config: tests/ubuntu-16-postgresql.config.yml
config_dir: /var/www/drupalvm/config
# Defaults - CentOS 7.
- distro: centos7
- type: centos
distro: centos7
init: /usr/lib/systemd/systemd
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"

Expand Down
8 changes: 8 additions & 0 deletions default.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ postgresql_databases:
postgresql_users:
- name: "{{ drupal_db_user }}"
password: "{{ drupal_db_password }}"
db: "{{ drupal_db_name }}"
priv: "ALL"

# Comment out any extra utilities you don't want to install. If you don't want
Expand Down Expand Up @@ -269,6 +270,13 @@ mysql_slow_query_time: 2
mysql_wait_timeout: 300
adminer_install_filename: index.php

# PostgreSQL configuration.
postgresql_global_config_options:
- option: unix_socket_directories
value: '{{ postgresql_unix_socket_directories | join(",") }}'
- option: bytea_output
value: 'escape'

# Node.js configuration (if enabled above).
# Valid examples: "0.10", "0.12", "4.x", "5.x".
nodejs_version: "0.12"
Expand Down
2 changes: 1 addition & 1 deletion provisioning/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
- include: tasks/extras.yml
- include: tasks/www.yml
- include: tasks/apparmor.yml
when: ansible_os_family == 'Debian'
when: ansible_os_family == 'Debian' and drupalvm_database == 'mysql'

# Build makefile if configured.
- include: tasks/build-makefile.yml
Expand Down
2 changes: 1 addition & 1 deletion provisioning/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
- src: geerlingguy.postfix
version: 1.1.0
- src: geerlingguy.postgresql
version: 1.0.0
version: 1.0.1
- src: geerlingguy.redis
version: 1.2.0
- src: geerlingguy.repo-remi
Expand Down
1 change: 1 addition & 0 deletions provisioning/roles/geerlingguy.postgresql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ A list of databases to ensure exist on the server. Only the `name` is required;
password: # defaults to not set
priv: # defaults to not set
role_attr_flags: # defaults to not set
db: # defaults to not set
login_host: # defaults to 'localhost'
login_password: # defaults to not set
login_user: # defaults to '{{ postgresql_user }}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ postgresql_users: []
# password: # defaults to not set
# priv: # defaults to not set
# role_attr_flags: # defaults to not set
# db: # defaults to not set
# login_host: # defaults to 'localhost'
# login_password: # defaults to not set
# login_user: # defaults to '{{ postgresql_user }}'
Expand Down
1 change: 1 addition & 0 deletions provisioning/roles/geerlingguy.postgresql/tasks/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
password: "{{ item.password | default(omit) }}"
priv: "{{ item.priv | default(omit) }}"
role_attr_flags: "{{ item.role_attr_flags | default(omit) }}"
db: "{{ item.db | default(omit) }}"
login_host: "{{ item.login_host | default('localhost') }}"
login_password: "{{ item.login_password | default(omit) }}"
login_user: "{{ item.login_user | default(postgresql_user) }}"
Expand Down

0 comments on commit fdf110e

Please sign in to comment.