This PR is to optimize adding the user_search function to {{pgbouncer_auth_dbname }} only and only once, if the given function already exists, the playbook will not perform the function creation step, when pgbouncer_auth_user is 'true'.
When pgbouncer_auth_user is 'false' a block will be used to create a userlist file.
When pgbouncer_auth_user is 'true', the playbook will use the block to create the user_search function in {{pgbouncer_auth_dbname }} only on the master server.
When restarting the playbook, when the user_search function is already exists in {{pgbouncer_auth_dbname }}, there will only be a stage of checking for the existence of this function, there will be no repeat stage to add the function.
This PR is to optimize adding the user_search function to {{pgbouncer_auth_dbname }} only and only once, if the given function already exists, the playbook will not perform the function creation step, when pgbouncer_auth_user is 'true'.
When pgbouncer_auth_user is 'false' a block will be used to create a userlist file.
When pgbouncer_auth_user is 'true', the playbook will use the block to create the user_search function in {{pgbouncer_auth_dbname }} only on the master server.
When restarting the playbook, when the user_search function is already exists in {{pgbouncer_auth_dbname }}, there will only be a stage of checking for the existence of this function, there will be no repeat stage to add the function.