1 Puppet::Type.newtype(:postgresql_conn_validator) do
3 @doc = "Verify that a connection can be successfully established between a node
4 and the PostgreSQL server. Its primary use is as a precondition to
5 prevent configuration changes from being applied if the PostgreSQL
6 server cannot be reached, but it could potentially be used for other
7 purposes such as monitoring."
14 newparam(:name, :namevar => true) do
15 desc 'An arbitrary name used as the identity of the resource.'
19 desc "The name of the database you are trying to validate a connection with."
22 newparam(:db_username) do
23 desc "A user that has access to the target PostgreSQL database."
26 newparam(:db_password) do
27 desc "The password required to access the target PostgreSQL database."
31 desc 'The DNS name or IP address of the server where PostgreSQL should be running.'
35 desc 'The port that the PostgreSQL server should be listening on.'
45 newparam(:connect_settings) do
46 desc 'Hash of environment variables for connection to a db.'
50 desc "The length of sleep time between connection tries."
63 desc "The number of tries to validate the connection to the target PostgreSQL database."
75 newparam(:psql_path) do
76 desc "Path to the psql command."
80 desc "System user that will run the psql command."
84 desc "Command to run against target database."