Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - name: "Create database"
- postgresql_db:
- name={{ postgres_db_name }}
- state=present
- become_user: postgres
- - name: "Create db user"
- postgresql_user:
- db={{ postgres_db_name }}
- name={{ postgres_db_user }}
- password={{ postgres_db_password }}
- priv=ALL
- become_user: postgres
- - name: "Remove unnecessary privileges"
- postgresql_user:
- name={{ postgres_db_user }}
- role_attr_flags=NOSUPERUSER,NOCREATEDB
- become_user: postgres
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement