ANSIBLE_LIBRARY=Ansible4IOM/modules/ ANSIBLE_ROLES_PATH=Ansible4IOM/roles/ ansible-playbook -i config-repos/oms-plain/distributed_azure_2.2/inventory Ansible4IOM/processes/reconfigure_pgserver.yml
The process consists of the following steps:
The process reconfigure_pgserver updates selected configurations of an already installed PostgreSQL server. Primarily, the process is able to apply changes made to variables defined in roles/pgserver_config/defaults. Please have a look into the according file to get information about which variables might be changed after initial setup and which not.
Additionally, the process reconfigure_pgserver executes the hook post_pgserver_configuration_hook, which allows configuration changes besides predefined variables.
In a second step, the process reconfigure_pgserver reruns the role omsdb_initialization too. This enables to change settings defined in roles/omsdb_initialization/defaults. Please have a look into the according file, to get more information. Finally, the only settings to be changed during process reconfigure_pgserver, are user and password of the IOM database account, which can be controlled by variables is_oms_db_user
and is_oms_db_pass
(roles/oms_config/defaults).
The password of the superuser is defined by variable PGSERVER_SUPERUSER_PASSWD
at roles/pgserver_config/defaults. Add this variable to the inventory and give it a new value. Also see Concept - Ansible4IOM Server Configuration Management 1.0 - 1.1.
... [all:vars] PGSERVER_SUPERUSER_PASSWD="NewPa22w0r6" ...
Now the process reconfigure_pgserver can be executed.
ANSIBLE_LIBRARY=<path to Ansible4IOM>/modules/ ANSIBLE_ROLES_PATH=<path to Ansible4IOM>/roles/ ansible-playbook -i <path to inventory file> <path to Ansible4IOM>/processes/reconfigure_pgserver.yml
The port of the database server is defined by the variable PGSERVER_PORT
at roles/pgserver_config/defaults. Add this variable to the inventory and give it a new value. According to the separation of components, IOM application servers need to be reconfigured to. Access of application-servers to the database is controlled by the property is.oms.db.hostlist
in cluster.properties, which is reflected by variable is_oms_db_hostlist
(defined at roles/oms_config/defaults). Hence this variable has to be adapted too. Also see Concept - Ansible4IOM Server Configuration Management 1.0 - 1.1.
... [all:vars] PGSERVER_PORT=5433 is_oms_db_hostlist="localhost:5433" ...
Now the process reconfigure_pgserver can be executed. Since IOM settings had to be changed too, the process reconfigure_oms_node needs to be run afterwards.
ANSIBLE_LIBRARY=<path to Ansible4IOM>/modules/ ANSIBLE_ROLES_PATH=<path to Ansible4IOM>/roles/ ansible-playbook -i <path to inventory file> <path to Ansible4IOM>/processes/reconfigure_pgserver.yml ANSIBLE_LIBRARY=<path to Ansible4IOM>/modules/ ANSIBLE_ROLES_PATH=<path to Ansible4IOM>/roles/ ansible-playbook -i <path to inventory file> <path to Ansible4IOM>/processes/reconfigure_oms_node.yml
To change database server settings besides predefined variables, the hook post_pgserver_configuration_hook has to be implemented. Depending on the scope of the hook (project or installation), the file post_pgserver_configuration_hook.yml has to be stored in the directory global_hooks or installation_hooks. Also see Concept - Ansible4IOM Server Configuration Management 1.0 - 1.1.
It is important to use variables PGSERVER_DATA
and PGServerOSUser
(see roles/pgserver_config/defaults) for a robust implementation of the hook.
- name: update postgreSQL configuration ini_file: dest: "{{PGSERVER_DATA}}/postgresql.conf" section: "" option: "{{item.option}}" value: "{{item.value}}" with_items: - { option: max_connections, value: 500 } become: true become_user: "{{PGServerOSUser}}"
Now process reconfigure_pgserver can be executed.
ANSIBLE_LIBRARY=<path to Ansible4IOM>/modules/ ANSIBLE_ROLES_PATH=<path to Ansible4IOM>/roles/ ansible-playbook -i <path to inventory file> <path to Ansible4IOM>/processes/reconfigure_pgserver.yml
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.