Backport PR of 57391 postgresql_table - fix conflicts

This commit is contained in:
Andrey Klychkov 2019-06-24 09:58:41 +03:00 committed by Toshio Kuratomi
parent 5ebc83bce6
commit 8f97d6da8b

View file

@ -700,42 +700,6 @@
- result.rowcount == 1
when: postgres_version_resp.stdout is version('9.1', '>=')
# Drop table CASCADE:
- name: postgresql_table - drop table cascade
become: yes
become_user: "{{ pg_user }}"
postgresql_table:
db: postgres
login_user: "{{ pg_user }}"
name: test5
state: absent
cascade: yes
register: result
ignore_errors: yes
- assert:
that:
- result.changed == true
- result.queries == ['DROP TABLE "test5" CASCADE']
when: postgres_version_resp.stdout is version('9.1', '>=')
# Check that the table doesn't exist after the previous step, rowcount must be - 0
- name: postgresql_table - check that table doesn't exist after the previous step
become_user: "{{ pg_user }}"
become: yes
postgresql_query:
db: postgres
login_user: "{{ pg_user }}"
query: "SELECT 1 FROM pg_stat_all_tables WHERE relname = 'test5'"
ignore_errors: yes
register: result
when: postgres_version_resp.stdout is version('9.1', '>=')
- assert:
that:
- result.rowcount == 0
when: postgres_version_resp.stdout is version('9.1', '>=')
#
# Create, drop, and rename table in a specific schema:
#