Merge branch 'master' of gitorious.research-infrastructures.eu:infrastructure-management/ansible-playbooks

This commit is contained in:
Fabio Sinibaldi 2017-12-11 19:00:34 +01:00
commit 231dc174c2
1 changed files with 12 additions and 9 deletions

View File

@ -15,15 +15,18 @@
when: item.managedb | default(True) when: item.managedb | default(True)
tags: [ 'postgresql', 'postgres', 'pg_db' ] tags: [ 'postgresql', 'postgres', 'pg_db' ]
- name: Add schemas to a database. # - name: Add schemas to a database.
become: True # become: True
become_user: postgres # become_user: postgres
postgresql_schema: database={{ item.0.name }} port={{ psql_db_port }} name={{ item.1 }} owner={{ item.0.user }} state={{ item.0.schemastate | default('present') }} # postgresql_schema: database={{ item.0.name }} port={{ psql_db_port }} name={{ item.1 }} owner={{ item.0.user }} state={{ item.0.schemastate | default('present') }}
with_subelements: # with_subelements:
- '{{ psql_db_data | default([]) }}' # - '{{ psql_db_data | default([]) }}'
- schema # - schema
when: item.manageschema | default(False) # when:
tags: [ 'postgresql', 'postgres', 'pg_db', 'pg_schema' ] # - item.0.manageschema | default(False)
# - item.1 is defined
# ignore_errors: True
# tags: [ 'postgresql', 'postgres', 'pg_db', 'pg_schema' ]
- name: Define a user with password, with no associated DBs - name: Define a user with password, with no associated DBs
become: True become: True