1 #####################################
2 ### someone's ansible provisioner ###
3 #####################################
4 # Part of: https://git.somenet.org/root/pub/somesible.git
5 # 2017-2024 by someone <someone@somenet.org>
8 - name: ensure pg user "{{pg_name}}" exists
12 password: "{{pg_pass}}"
13 conn_limit: "{{pg_conn_limit | default(50)}}"
14 when: pg_name != "" and pg_pass != ""
17 - name: create db "{{pg_name}}"
18 become_user: "postgres"
24 - name: set owner of schema "{{pg_name}}.public" to user "{{pg_name}}"
25 become_user: "postgres"
27 database: "{{pg_name}}"
32 - name: revoke privs for PUBLIC on db "{{pg_name}}"
42 - name: revoke privs for PUBLIC on schema "{{pg_name}}.public"
53 - name: ensure group grp_spectator exists and grant necessary privs on db "{{pg_name}}"
57 role_attr_flags: "NOLOGIN,NOSUPERUSER,INHERIT,NOCREATEDB,NOCREATEROLE,NOREPLICATION"
59 priv: CONNECT,TEMPORARY