This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
ansible-role-warehost/warehost-db/tasks/main.yml

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