You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In tasks/replication.yml
This errors occurs while I'm testing this role on vagrant guests.
Problem 1
has a delegate_to: "{{ mysql_replication_master }} option which in my case needed a remote_user
to fix a remote SSH connection failure
Problem 2
a) When I give the remote_user: my ansible_user variable it gives me an "Unhandled exception occurred while templating"
b) Using a custom group variable gives me an "msg": "'remote_user' is undefined"
solution is to set a variable in defaults/main.yml which can be overridden for the different used distribution ....
- name: Check master replication status.
mysql_replication: mode=getprimary
delegate_to: "{{ mysql_replication_master }}"
remote_user: "{{ guest_user }}"
register: master
when:
- (slave.Is_Replica is defined and not slave.Is_Replica) or (slave.Is_Replica is not defined and slave is failed)
- mysql_replication_role == 'slave'
- (mysql_replication_master | length) > 0
tags: ['skip_ansible_galaxy']
- name: "debug 'master' var"
debug:
msg: "{{ master }}, guest_user: {{ guest_user }}"
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
In tasks/replication.yml
This errors occurs while I'm testing this role on vagrant guests.
Problem 1
has a
delegate_to: "{{ mysql_replication_master }}
option which in my case needed aremote_user
to fix a remote SSH connection failure
Problem 2
a) When I give the
remote_user:
myansible_user
variable it gives me an "Unhandled exception occurred while templating"b) Using a custom group variable gives me an "msg": "'remote_user' is undefined"
solution is to set a variable in
defaults/main.yml
which can be overridden for the different used distribution ....This is also a follow up of #495
The text was updated successfully, but these errors were encountered: