isinfield / isinfield.rethinkdb / 1.0.0 / module / query Query a RethinkDB database | "added in version" 2.10 of isinfield.rethinkdb" Authors: Ken Sinfield (@isinfield) beta | supported by Ken Sinfieldisinfield.rethinkdb.query (1.0.0) — module
Install with ansible-galaxy collection install isinfield.rethinkdb:==1.0.0
collections: - name: isinfield.rethinkdb version: 1.0.0
Run a REQL query against a RethinkDB database
- hosts: localhost connection: local gather_facts: no tasks: - name: Select all RethinkDB users kensinfield.rethinkdb.query: host: "{{host}}" user: "{{user}}" password: "{{password}}" port: "{{port}}" query: "db('rethinkdb').table('users')" - name: Create a table in the DB named test kensinfield.rethinkdb.query: host: "{{host}}" user: "{{user}}" password: "{{password}}" port: "{{port}}" query: "db('test').table_create('authors')"
host: description: - The hostname or IP address (v4 or v6) of the RethinkDB host required: true type: str port: default: 28015 description: - The TCP port to connect to on the RedthinkDB host required: false type: int user: description: - The RethinkDB user to connect with required: true type: str query: description: - The REQL query statement - Requires the db is specified. See examples below required: true type: str password: description: - The RethinkDB user's password required: true type: str
data: description: A list of returned documents returned: success type: list msg: description: A useful message returned: fail type: str