16 lines
430 B
YAML
16 lines
430 B
YAML
---
|
|
- name: Create database
|
|
become: true
|
|
become_user: postgres
|
|
become_method: su
|
|
postgresql_db: name={{ warehost_db_dbname }}
|
|
when: warehost_db_pass is defined
|
|
|
|
- name: Create users for database
|
|
become: true
|
|
become_user: postgres
|
|
become_method: su
|
|
postgresql_user: db={{ warehost_db_dbname }} name={{ warehost_db_user }} password='{{ warehost_db_pass }}'
|
|
register: createdb
|
|
when: warehost_db_pass is defined
|