mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
postgresql_lang: add trust_input parameter (#272)
* postgresql_lan: add trust_input parameter * add changelog fragment
This commit is contained in:
parent
e6b6c05bf7
commit
19cad71f25
3 changed files with 22 additions and 4 deletions
|
@ -30,6 +30,7 @@
|
|||
<<: *pg_parameters
|
||||
name: '{{ test_lang }}'
|
||||
owner: '{{ test_user1 }}'
|
||||
trust_input: no
|
||||
check_mode: yes
|
||||
|
||||
- assert:
|
||||
|
@ -57,11 +58,12 @@
|
|||
<<: *pg_parameters
|
||||
name: '{{ test_lang }}'
|
||||
owner: '{{ test_user1 }}'
|
||||
trust_input: no
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
- result.queries == ['CREATE LANGUAGE "{{ test_lang }}"', 'ALTER LANGUAGE "{{ test_lang }}" OWNER TO {{ test_user1 }}']
|
||||
- result.queries == ['CREATE LANGUAGE "{{ test_lang }}"', 'ALTER LANGUAGE "{{ test_lang }}" OWNER TO "{{ test_user1 }}"']
|
||||
|
||||
- name: Check
|
||||
<<: *task_parameters
|
||||
|
@ -83,12 +85,13 @@
|
|||
<<: *pg_parameters
|
||||
name: '{{ test_lang }}'
|
||||
owner: '{{ test_user2 }}'
|
||||
trust_input: yes
|
||||
check_mode: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
- result.queries == ['ALTER LANGUAGE "{{ test_lang }}" OWNER TO {{ test_user2 }}']
|
||||
- result.queries == ['ALTER LANGUAGE "{{ test_lang }}" OWNER TO "{{ test_user2 }}"']
|
||||
|
||||
- name: Check that nothing was actually changed
|
||||
<<: *task_parameters
|
||||
|
@ -116,7 +119,7 @@
|
|||
- result is changed
|
||||
# TODO: the first elem of the returned list below
|
||||
# looks like a bug, not related with the option owner, needs to be checked
|
||||
- result.queries == ["UPDATE pg_language SET lanpltrusted = false WHERE lanname = '{{ test_lang }}'", 'ALTER LANGUAGE "{{ test_lang }}" OWNER TO {{ test_user2 }}']
|
||||
- result.queries == ["UPDATE pg_language SET lanpltrusted = false WHERE lanname = '{{ test_lang }}'", 'ALTER LANGUAGE "{{ test_lang }}" OWNER TO "{{ test_user2 }}"']
|
||||
|
||||
- name: Check
|
||||
<<: *task_parameters
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue