
See documentation at:
gpconfig: https://docs.vmware.com/en/VMware-Greenplum/7/greenplum-database/utility_guide-ref-gpconfig.html

variables of role:
  gpdb_config_param_name:  parameter that you should pass in order to get, set, add, remove values
  gpdb_config_set_on_master_only: true/false. When specified, gpconfig will only edit the master postgresql.conf file
    pass flag --masteronly to gpconfig -c
  gpdb_config_set_master_value: parameter that will be applied to master and segment only, pass -m option to gpconfig -c
  gpdb_config_set_value_options: Options that should be passed to gpconfig -c (for example --skipvalidation)

values can be returned:
  gpdb_config_get_result: result of get value of parameter {{ gpdb_config_param_name }}
  gpdb_config_set_result: result of set value {{ gpdb_config_param_value }} for parameter {{ gpdb_config_param_name }}
  gpdb_config_remove_result: result of remove parameter {{ gpdb_config_param_name }} (gpconfig -r)

Usage examples:
- name: Get gpperfmon conf
  include_role:
    name: gpdb_config
  vars:
    gpdb_config_actions: [get]
    gpdb_config_param_name: gp_enable_gpperfmon

- name: Get existing shared library
  include_role:
    name: gpdb_config
  vars:
    gpdb_config_actions: [get]
    gpdb_config_param_name: shared_preload_libraries

- name: Set value gp_enable_gpperfmon on
  include_role:
    name: gpdb_config
  vars:
    gpdb_config_actions: [set]
    gpdb_config_param_name: gp_enable_gpperfmon
    gpdb_config_param_value: on

- name: Set value archive_mode off with skipvalidation
  include_role:
    name: gpdb_config
  vars:
    gpdb_config_actions: [set]
    gpdb_config_param_name: archive_mode
    gpdb_config_param_value: off
    gpdb_config_set_value_options: "--skipvalidation"

- name: Set value temp_tablespaces on with skipvalidation only on master
  include_role:
    name: gpdb_config
  vars:
    gpdb_config_actions: [set]
    gpdb_config_param_name: archive_mode
    gpdb_config_param_value: on
    gpdb_config_set_on_master_only: true
    gpdb_config_set_value_options: "--skipvalidation"

- name: Set value for segments and master
  include_role:
    name: gpdb_config
  vars:
    gpdb_config_actions: [set]
    gpdb_config_param_name: archive_mode
    gpdb_config_param_value: on
    gpdb_config_set_master_value: off

- name: Remove parameter
  include_role:
    name: gpdb_config
  vars:
    gpdb_config_actions: [remove]
    gpdb_config_param_name: archive_mode
    gpdb_config_set_value_options: "--skipvalidation"
