community / community.cockroachdb / 0.3.1 / module / cockroachdb_db Create, modify or delete a CockroachDB database | "added in version" 0.3.0 of community.cockroachdb" Authors: Andrew Klychkov (@Andersson007), Aleksandr Vagachev (@aleksvagachev)community.cockroachdb.cockroachdb_db (0.3.1) — module
Install with ansible-galaxy collection install community.cockroachdb:==0.3.1
collections: - name: community.cockroachdb version: 0.3.1
Creates, modifies or deletes a CockroachDB database.
# Connect in the verify-full SSL mode to the acme database # and create the test_db database - name: Create test_db database community.cockroachdb.cockroachdb_db: login_host: 192.168.0.10 login_db: acme ssl_mode: verify-full ssl_root_cert: /tmp/certs/ca.crt ssl_cert: /tmp/certs/client.root.crt ssl_key: /tmp/certs/client.root.key name: test_db
- name: Drop test_db database community.cockroachdb.cockroachdb_db: login_host: 192.168.0.10 login_db: acme state: absent name: test_db
- name: Change owner from test_db database community.cockroachdb.cockroachdb_db: login_host: 192.168.0.10 login_db: acme name: test_db owner: test_user
name: description: Database name to create, modify or delete. required: true type: str owner: description: Database owner. type: str state: choices: - absent - present default: present description: - If C(present), creates if it does not exist or modifies it. - If C(absent), deletes the database. type: str ssl_key: description: - Specifies the location for the secret key used for the client certificate. type: path login_db: description: - Database name to connect to. type: str ssl_cert: description: - Specifies the file name of the client SSL certificate. type: path 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. - Refer to 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: default: localhost description: - Host running the database. type: str login_port: default: 26257 description: - Database port to connect to. type: int login_user: default: root description: - User name used to connect to the database. type: str ssl_root_cert: 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: path login_password: description: - The password of the I(login_user). type: str login_unix_socket: description: - Path to a directory containing a Unix domain socket for local connections. type: path