Created
July 10, 2013 23:32
-
-
Save nickhs/5971195 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Error | |
TASK: [create foobar database user] *********************************** | |
failed: [ec2-184-73-128-96.compute-1.amazonaws.com] => {"failed": true, "item": ""} | |
msg: unable to connect to database: FATAL: Peer authentication failed for user "postgres" | |
# Playbook | |
--- | |
- hosts: dbservers | |
sudo: yes | |
user: root | |
sudo_user: postgres | |
vars_files: | |
- vars.yml | |
tasks: | |
- include: tasks/createdb.yml | |
handlers: | |
- include: handlers.yml | |
# createdb.yml | |
--- | |
- name: create ${app_name} database user | |
action: postgresql_user user=${app_name} password=${database_password} state=present | |
- name: create database | |
action: postgresql_db name=${app_name} owner=${app_name} state=present | |
notify: build database |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment