mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-24 04:39:15 +00:00
[stable-1] Various backports from community.postgres (#1789)
* postgresql modules: various backports from community.postgresql * Add postgresql_set community/postgresql/pull/52 backport * Fix * Update plugins/modules/database/postgresql/postgresql_set.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/database/postgresql/postgresql_set.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update changelogs/fragments/1-community-postgresql_backports.yml Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
91acc44c34
commit
3a2e614071
10 changed files with 296 additions and 32 deletions
|
|
@ -373,3 +373,70 @@
|
|||
- assert:
|
||||
that:
|
||||
- result is not changed
|
||||
|
||||
- name: Pass non-existent parameter
|
||||
<<: *task_parameters
|
||||
postgresql_set:
|
||||
<<: *pg_parameters
|
||||
name: Timezone
|
||||
value: utc
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is failed
|
||||
- result.msg is search('No such parameter')
|
||||
|
||||
#######################################################################
|
||||
# https://github.com/ansible-collections/community.postgresql/issues/48
|
||||
- name: Pass a parameter containing b in check_mode
|
||||
<<: *task_parameters
|
||||
postgresql_set:
|
||||
<<: *pg_parameters
|
||||
name: archive_command
|
||||
value: '/usr/bin/touch %f'
|
||||
register: result
|
||||
check_mode: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
|
||||
- name: Pass a parameter containing b
|
||||
<<: *task_parameters
|
||||
postgresql_set:
|
||||
<<: *pg_parameters
|
||||
name: archive_command
|
||||
value: '/usr/bin/touch %f'
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
|
||||
- name: Pass another parameter containing B in check_mode
|
||||
<<: *task_parameters
|
||||
postgresql_set:
|
||||
<<: *pg_parameters
|
||||
name: track_activity_query_size
|
||||
value: '4096B'
|
||||
register: result
|
||||
check_mode: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
|
||||
- name: Pass another parameter containing b in check_mode
|
||||
<<: *task_parameters
|
||||
postgresql_set:
|
||||
<<: *pg_parameters
|
||||
name: track_activity_query_size
|
||||
value: '2048b'
|
||||
register: result
|
||||
check_mode: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue