Class: Ansible::Ruby::Modules::Postgresql_privs
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Postgresql_privs
- Defined in:
- lib/ansible/ruby/modules/generated/database/postgresql/postgresql_privs.rb
Overview
Grant or revoke privileges on PostgreSQL database objects. This module is basically a wrapper around most of the functionality of PostgreSQL’s GRANT and REVOKE statements with detection of changes (GRANT/REVOKE I(privs) ON I(type) I(objs) TO/FROM I(roles))
Instance Method Summary collapse
-
#database ⇒ String
Name of database to connect to.,Alias: I(db).
-
#grant_option ⇒ Symbol?
Whether C(role) may grant/revoke the specified privileges/group memberships to others.,Set to C(no) to revoke GRANT OPTION, leave unspecified to make no changes.,I(grant_option) only has an effect if I(state) is C(present).,Alias: I(admin_option).
-
#host ⇒ Object?
Database host address.
-
#login ⇒ String?
The username to authenticate with.,Alias: I(login_user).
-
#objs ⇒ Array<String>, ...
Comma separated list of database objects to set privileges on.,If I(type) is C(table) or C(sequence), the special value C(ALL_IN_SCHEMA) can be provided instead to specify all database objects of type I(type) in the schema specified via I(schema).
-
#password ⇒ Object?
The password to authenticate with.,Alias: I(login_password)).
-
#port ⇒ Integer?
Database port to connect to.
-
#privs ⇒ Array<String>, ...
Comma separated list of privileges to grant/revoke.,Alias: I(priv).
-
#roles ⇒ Array<String>, String
Comma separated list of role (user/group) names to set permissions for.,The special value C(PUBLIC) can be provided instead to set permissions for the implicitly defined PUBLIC group.,Alias: I(role).
-
#schema ⇒ String?
Schema that contains the database objects specified via I(objs).,May only be provided if I(type) is C(table), C(sequence) or C(function).
-
#ssl_mode ⇒ :disable, ...
Determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server.,See www.postgresql.org/docs/current/static/libpq-ssl.html for more information on the modes.,Default of C(prefer) matches libpq default.
-
#ssl_rootcert ⇒ Object?
Specifies the name of a file containing SSL certificate authority (CA) certificate(s).
-
#state ⇒ :present, ...
If C(present), the specified privileges are granted, if C(absent) they are revoked.
-
#type ⇒ :table, ...
Type of database object to set privileges on.,The ‘default_prives` choice is available starting at version 2.7.
-
#unix_socket ⇒ Object?
Path to a Unix domain socket for local connections.,Alias: I(login_unix_socket).
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#database ⇒ String
Returns Name of database to connect to.,Alias: I(db).
13 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_privs.rb', line 13 attribute :database |
#grant_option ⇒ Symbol?
Returns Whether C(role) may grant/revoke the specified privileges/group memberships to others.,Set to C(no) to revoke GRANT OPTION, leave unspecified to make no changes.,I(grant_option) only has an effect if I(state) is C(present).,Alias: I(admin_option).
41 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_privs.rb', line 41 attribute :grant_option |
#host ⇒ Object?
Returns Database host address. If unspecified, connect via Unix socket.,Alias: I(login_host).
45 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_privs.rb', line 45 attribute :host |
#login ⇒ String?
Returns The username to authenticate with.,Alias: I(login_user).
55 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_privs.rb', line 55 attribute :login |
#objs ⇒ Array<String>, ...
Returns Comma separated list of database objects to set privileges on.,If I(type) is C(table) or C(sequence), the special value C(ALL_IN_SCHEMA) can be provided instead to specify all database objects of type I(type) in the schema specified via I(schema). (This also works with PostgreSQL < 9.0.),If I(type) is C(database), this parameter can be omitted, in which case privileges are set for the database specified via I(database).,If I(type) is I(function), colons (“:”) in object names will be replaced with commas (needed to specify function signatures, see examples),Alias: I(obj).
29 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_privs.rb', line 29 attribute :objs |
#password ⇒ Object?
Returns The password to authenticate with.,Alias: I(login_password)).
59 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_privs.rb', line 59 attribute :password |
#port ⇒ Integer?
Returns Database port to connect to.
48 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_privs.rb', line 48 attribute :port |
#privs ⇒ Array<String>, ...
Returns Comma separated list of privileges to grant/revoke.,Alias: I(priv).
21 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_privs.rb', line 21 attribute :privs |
#roles ⇒ Array<String>, String
Returns Comma separated list of role (user/group) names to set permissions for.,The special value C(PUBLIC) can be provided instead to set permissions for the implicitly defined PUBLIC group.,Alias: I(role).
37 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_privs.rb', line 37 attribute :roles |
#schema ⇒ String?
Returns Schema that contains the database objects specified via I(objs).,May only be provided if I(type) is C(table), C(sequence) or C(function). Defaults to C(public) in these cases.
33 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_privs.rb', line 33 attribute :schema |
#ssl_mode ⇒ :disable, ...
Returns Determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server.,See www.postgresql.org/docs/current/static/libpq-ssl.html for more information on the modes.,Default of C(prefer) matches libpq default.
62 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_privs.rb', line 62 attribute :ssl_mode |
#ssl_rootcert ⇒ Object?
Returns Specifies the name of a file containing SSL certificate authority (CA) certificate(s). If the file exists, the server’s certificate will be verified to be signed by one of these authorities.
66 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_privs.rb', line 66 attribute :ssl_rootcert |
#state ⇒ :present, ...
Returns If C(present), the specified privileges are granted, if C(absent) they are revoked.
17 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_privs.rb', line 17 attribute :state |
#type ⇒ :table, ...
Returns Type of database object to set privileges on.,The ‘default_prives` choice is available starting at version 2.7.
25 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_privs.rb', line 25 attribute :type |
#unix_socket ⇒ Object?
Returns Path to a Unix domain socket for local connections.,Alias: I(login_unix_socket).
52 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_privs.rb', line 52 attribute :unix_socket |