Hi. I'm afraid my expressions may be rude or hard to read, because I'm not
so good at English.
I want to change master with `mysql_replication` but error.
TASK [dbtier : Semi-synchronous - Change master]
*******************************
skipping: [192.168.30.5] => {"changed": false, "skip_reason": "Conditional
check failed", "skipped": true}
fatal: [192.168.30.6]: FAILED! => {"failed": true, "msg": "the field 'args'
has an invalid value, which appears to include a variable that is
undefined. The error was: 'dict object' has no attribute 'File'\n\nThe
error appears to have been in
'/root/USME-Playbook/roles/dbtier/tasks/main.yml': line 96, column 3, but
may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe
offending line appears to be:\n\n\n- name: Semi-synchronous - Change
master\n ^ here\n"}
Code:
- name: Semi-synchronous - Stop slave if running
mysql_replication: mode=stopslave
when: hostname.stdout.find('usme-db-slave') == 0
- name: Semi-synchronous - Import all_db_dump.sql
shell: mysql --defaults-file=/root/.my.cnf < /root/all_db_dump.sql
when: hostname.stdout.find('usme-db-slave') == 0
- name: Semi-synchnorous - Restart percona server
service: name=mysql state=restarted
- name: Semi-synchronous - Get master binlog filename and binlog position
mysql_replication: mode=getmaster
register: binlog
when: hostname.stdout.find('usme-db-master') == 0
- name: Semi-synchronous - Change master *# Error here*
mysql_replication: mode=changemaster master_host=192.168.30.5
master_user=repuser master_password='password' master_port=3306
master_log_file="{{ binlog.File }}" master_log_pos="{{ binlog.Position }}"
when: hostname.stdout.find('usme-db-slave') == 0
Version:
ansible 2.3.0 (devel 8331e915e0) last updated 2016/10/29 00:18:29 (GMT +000)
lib/ansible/modules/core: (detached HEAD de7ec946e9) last updated
2016/10/29 00:18:41 (GMT +000)
lib/ansible/modules/extras: (detached HEAD 8bd40fb622) last updated
2016/10/29 00:19:00 (GMT +000)
config file =
configured module search path = Default w/o overrides
How to resolve this error?
Thanks.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/c04f3d67-1e70-4b88-bf9c-8a7004f50a89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.