library/roles/postgresql/tasks/manage_pg_db.yml: Ansible 2 compatibility
This commit is contained in:
parent
6c3822e2e8
commit
549e18af31
|
@ -3,7 +3,7 @@
|
|||
become: True
|
||||
become_user: postgres
|
||||
postgresql_user: user={{ item.user }} password={{ item.pwd }} role_attr_flags={{ item.roles }} port={{ psql_db_port }} state={{ item.userstate | default('present') }}
|
||||
with_items: '{{ psql_db_data }}'
|
||||
with_items: '{{ psql_db_data | default(omit) }}'
|
||||
when: item.roles is defined
|
||||
tags: [ 'postgresql', 'postgres', 'pg_db' ]
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
|||
become: True
|
||||
become_user: postgres
|
||||
postgresql_db: db={{ item.name }} port={{ psql_db_port }} encoding={{ item.encoding }} owner={{ item.user }} template=template0 state={{ item.state | default('present') }}
|
||||
with_items: '{{ psql_db_data }}'
|
||||
with_items: '{{ psql_db_data | default(omit) }}'
|
||||
when: item.managedb
|
||||
tags: [ 'postgresql', 'postgres', 'pg_db' ]
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
|||
become: True
|
||||
become_user: postgres
|
||||
postgresql_user: user={{ item.user }} password={{ item.pwd }} port={{ psql_db_port }}
|
||||
with_items: '{{ psql_db_data }}'
|
||||
with_items: '{{ psql_db_data | default(omit) }}'
|
||||
when:
|
||||
- item.pwd is defined
|
||||
- item.roles is not defined
|
||||
|
|
Loading…
Reference in New Issue