community / community.general / 0.2.1 / module / postgresql_user_obj_stat_info Gather statistics about PostgreSQL user objects | "added in version" 0.2.0 of community.general" Authors: Andrew Klychkov (@Andersson007), Thomas O'Donnell (@andytom)community.general.postgresql_user_obj_stat_info (0.2.1) — module
Install with ansible-galaxy collection install community.general:==0.2.1
collections: - name: community.general version: 0.2.1
Gathers statistics about PostgreSQL user objects.
- name: Collect information about all supported user objects of the acme database postgresql_user_obj_stat_info: db: acme
- name: Collect information about all supported user objects in the custom schema of the acme database postgresql_user_obj_stat_info: db: acme schema: custom
- name: Collect information about user tables and indexes in the acme database postgresql_user_obj_stat_info: db: acme filter: tables, indexes
db: aliases: - login_db description: - Name of database to connect. type: str port: aliases: - login_port default: 5432 description: - Database port to connect to. type: int filter: description: - Limit the collected information by comma separated string or YAML list. - Allowable values are C(functions), C(indexes), C(tables). - By default, collects all subsets. - Unsupported values are ignored. elements: str type: list schema: description: - Restrict the output by certain schema. type: str ca_cert: aliases: - ssl_rootcert description: - 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. type: str ssl_mode: choices: - allow - disable - prefer - require - verify-ca - verify-full default: prefer description: - Determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server. - See U(https://www.postgresql.org/docs/current/static/libpq-ssl.html) for more information on the modes. - Default of C(prefer) matches libpq default. type: str login_host: description: - Host running the database. type: str login_user: default: postgres description: - The username used to authenticate with. type: str trust_input: default: true description: - If C(no), check the value of I(session_role) is potentially dangerous. - It only makes sense to use C(no) only when SQL injections via I(session_role) are possible. type: bool version_added: 0.2.0 version_added_collection: community.general session_role: description: - Switch to session_role after connecting. The specified session_role must be a role that the current login_user is a member of. - Permissions checking for SQL commands is carried out as though the session_role were the one that had logged in originally. type: str login_password: description: - The password used to authenticate with. type: str login_unix_socket: description: - Path to a Unix domain socket for local connections. type: str
functions: description: User function statistics. returned: always sample: public: inc: calls: 1 funcid: 26722 self_time: 0.23 total_time: 0.23 type: dict indexes: description: User index statistics returned: always sample: public: test_id_idx: '...': null idx_scan: 0 idx_tup_fetch: 0 idx_tup_read: 0 relname: test size: 8192 type: dict tables: description: User table statistics. returned: always sample: public: test: '...': null analyze_count: 3 n_dead_tup: 0 n_live_tup: 0 seq_scan: 2 size: 0 total_size: 8192 type: dict