Class: Ansible::Ruby::Modules::Postgresql_user
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Postgresql_user
- Defined in:
- lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb
Overview
Add or remove PostgreSQL users (roles) from a remote host and, optionally, grant the users access to an existing database or tables. The fundamental function of the module is to create, or delete, roles from a PostgreSQL cluster. Privilege assignment, or removal, is an optional step, which works on one database at a time. This allows for the module to be called several times in the same module to modify the permissions on different databases, or to grant permissions to already existing users. A user cannot be removed until all the privileges have been stripped from the user. In such situation, if the module tries to remove the user it will fail. To avoid this from happening the fail_on_user option signals the module to try to remove the user, but if not possible keep going; the module will report if changes happened and separately if the user was removed or not.
Instance Method Summary collapse
-
#conn_limit ⇒ Object?
Specifies the user connection limit.
-
#db ⇒ String?
Name of database where permissions will be granted.
-
#encrypted ⇒ :yes, ...
Whether the password is stored hashed in the database.
-
#expires ⇒ String?
The date at which the user’s password is to expire.,If set to C(‘infinity’), user’s password never expire.,Note that this value should be a valid SQL date and time type.
-
#fail_on_user ⇒ :yes, ...
If C(yes), fail when user can’t be removed.
-
#login_host ⇒ String?
Host running PostgreSQL.
-
#login_password ⇒ Object?
Password used to authenticate with PostgreSQL.
-
#login_unix_socket ⇒ Object?
Path to a Unix domain socket for local connections.
-
#login_user ⇒ String?
User (role) used to authenticate with PostgreSQL.
-
#name ⇒ String
Name of the user (role) to add or remove.
-
#no_password_changes ⇒ :yes, ...
If C(yes), don’t inspect database for password changes.
-
#password ⇒ String?
Set the user’s password, before 1.4 this was required.,Password can be passed unhashed or hashed (MD5-hashed).,Unhashed password will automatically be hashed when saved into the database if C(encrypted) parameter is set, otherwise it will be save in plain text format.,When passing a hashed password it must be generated with the format C(‘str + md5[ password + username ]’), resulting in a total of 35 characters.
-
#port ⇒ Integer?
Database port to connect to.
-
#priv ⇒ String?
PostgreSQL privileges string in the format: C(table:priv1,priv2).
-
#role_attr_flags ⇒ :"[NO]SUPERUSER", ...
PostgreSQL role attributes string in the format: CREATEDB,CREATEROLE,SUPERUSER.,Note that ‘[NO]CREATEUSER’ is deprecated.
-
#ssl_mode ⇒ :disable, ...
Determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server.,See U(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, ...
The user (role) state.
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
#conn_limit ⇒ Object?
79 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb', line 79 attribute :conn_limit |
#db ⇒ String?
22 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb', line 22 attribute :db |
#encrypted ⇒ :yes, ...
60 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb', line 60 attribute :encrypted |
#expires ⇒ String?
64 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb', line 64 attribute :expires |
#fail_on_user ⇒ :yes, ...
26 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb', line 26 attribute :fail_on_user |
#login_host ⇒ String?
41 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb', line 41 attribute :login_host |
#login_password ⇒ Object?
38 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb', line 38 attribute :login_password |
#login_unix_socket ⇒ Object?
45 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb', line 45 attribute :login_unix_socket |
#login_user ⇒ String?
34 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb', line 34 attribute :login_user |
#name ⇒ String
14 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb', line 14 attribute :name |
#no_password_changes ⇒ :yes, ...
68 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb', line 68 attribute :no_password_changes |
#password ⇒ String?
18 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb', line 18 attribute :password |
#port ⇒ Integer?
30 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb', line 30 attribute :port |
#priv ⇒ String?
48 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb', line 48 attribute :priv |
#role_attr_flags ⇒ :"[NO]SUPERUSER", ...
52 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb', line 52 attribute :role_attr_flags |
#ssl_mode ⇒ :disable, ...
72 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb', line 72 attribute :ssl_mode |
#ssl_rootcert ⇒ Object?
76 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb', line 76 attribute :ssl_rootcert |
#state ⇒ :present, ...
56 |
# File 'lib/ansible/ruby/modules/generated/database/postgresql/postgresql_user.rb', line 56 attribute :state |