質問に書かれているタスクが "/root/USME-Playbook/roles/dbtier/tasks/main.yml" の96行目という認識で合っているでしょうか? もし、このタスクの前に "debug: var={{ binlog_status }}" のようにすると、変数の中身が取得できるでしょうか?
- name: Semi-synchronous - Change master mysql_replication: mode=changemaster master_host=192.168.30.5 master_user=repuser master_password='pass' master_port=3306 master_log_file={{ binlog_status.File }} master_log_pos={{ binlog_status.Position }} when: hostname.stdout.find('usme-db-slave') == 0
上記のタスクを実行すると
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 offendingline appears to be:\n\n\n- name: Semi-synchronous - Change master\n ^ here\n" }
とエラーがでてしまいます。
shell: ではなく mysql_replicationでも同様のエラーなのですが
上記コマンドのどこがいけないのでしょうか。
ご教授してくださる方がいましたら幸いです。
あなたの回答
tips
プレビュー