I'm trying to ignore a particular error message in playbook output is having below error message.
fatal: [192.168.0.1]: FAILED! => {"changed": false, "failed": true, "msg": "Sending passwords in plain text without SSL/TLS is extremely insecure.. Query == CHANGE MASTER TO ['MASTER_HOST=%(master_host)s', 'MASTER_USER=%(master_user)s', 'MASTER_PASSWORD=%(master_password)s', 'MASTER_LOG_FILE=%(master_log_file)s', 'MASTER_LOG_POS=%(master_log_pos)s']"}
> Task: > - name: Setup Replication become: true mysql_replication: > login_host: "{{ slave_ip }}" > login_user: "user" > login_password: "***" > mode: changemaster > master_host: "{{ master_ip }}" > master_log_file: mysql-bin.000001 > master_log_pos: 107 > master_user: "{{ mysql_replicator_user }}" > master_password: "{{ mysql_replicator_password }}"
Any luck? how to achieve this?
EDITED: Reply to Marco Answer - well that is the problem here, I would not know what error I might get. But I'm sure that if err msg contains "Sending passwords in plain text without SSL" then ignore if not and anyother error then don't ignore. To explain in simple "Throw exception if error msg doesn't contain -> 'null' or SSL."
failed_when: 'error message' in out.stderr
>>"failed_when: 'error message' in out.stderr"
. – Elijah Lynn Feb 25 '21 at 01:48