I would like to create a mysql innodb cluster. SO I want to run the mysql shell commands in ansible playbook. But getting memory error. Below are the code and error-
tasks:
- name: get cluster status from dbboxes
shell: mysqlsh test123:test123@box1:3306 -e "createCluster('test_cluster')"
Execution error as below-
The full traceback is: Traceback (most recent call last): File
"/tmp/ansible_command_payload__lbu2_tp/ansible_command_payload.zip/ansible/module_utils/basic.py", line 2724, in run_command stdout += b_chunk
MemoryError
fatal: [localhost]: FAILED! => { "changed": false, "cmd": "/u01/mysql/8.0/bin/mysqlsh --uri 'test123:********@box1:3306' -e 'var cluster=dba.createCluster('\"'\"'test_cluster'\"'\"')'", "invocation": { "module_args": { "_raw_params": "/u01/mysql/8.0/bin/mysqlsh --uri test123:test123@box1:3306 -e \"var cluster=dba.createCluster('test_cluster')\"", "_uses_shell": true, "argv": null, "chdir": null, "creates": null, "executable": null, "removes": null, "stdin": null, "stdin_add_newline": true, "strip_empty_ends": true, "warn": true } }, "msg": "", "rc": 257
}
Kindly suggest any better approach for this