Resource Type: postgresql_conn_validator

Defined in:
lib/puppet/type/postgresql_conn_validator.rb
Providers:
ruby

Summary

Verify if a connection can be successfully established

Overview

Verify that a connection can be successfully established between a node and the PostgreSQL server. Its primary use is as a precondition to prevent configuration changes from being applied if the PostgreSQL server cannot be reached, but it could potentially be used for other purposes such as monitoring.

Properties

  • ensure (defaults to: present)

    Ensure connection validation

    Supported values:
    • present
    • absent

Parameters

  • command (defaults to: SELECT 1)

    Command to run against target database.

  • connect_settings

    Hash of environment variables for connection to a db.

  • db_name

    The name of the database you are trying to validate a connection with.

  • db_password

    The password required to access the target PostgreSQL database.

  • db_username

    A user that has access to the target PostgreSQL database.

  • host

    The DNS name or IP address of the server where PostgreSQL should be running.

  • name (namevar)

    An arbitrary name used as the identity of the resource.

  • port

    The port that the PostgreSQL server should be listening on.

  • provider

    The specific backend to use for this ‘postgresql_conn_validator` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

  • psql_path

    Path to the psql command.

  • run_as

    System user that will run the psql command.

  • sleep (defaults to: 2)

    The length of sleep time between connection tries.

  • tries (defaults to: 10)

    The number of tries to validate the connection to the target PostgreSQL database.