From 6f8e3548050b5126787a413c470ec980b2f4c211 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Mon, 22 May 2017 12:34:36 +0200 Subject: [PATCH] Use internal interface to connect with keystone_ssh Change-Id: I1283014f785c2e6abf8db99c4fd71c008718a35e Closes-bug: #1695102 --- ansible/roles/keystone/templates/fernet-node-sync.sh.j2 | 2 +- ansible/roles/keystone/templates/fernet-rotate.sh.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/keystone/templates/fernet-node-sync.sh.j2 b/ansible/roles/keystone/templates/fernet-node-sync.sh.j2 index a100f23771..971b332760 100644 --- a/ansible/roles/keystone/templates/fernet-node-sync.sh.j2 +++ b/ansible/roles/keystone/templates/fernet-node-sync.sh.j2 @@ -11,6 +11,6 @@ fi # For each host node sync tokens {% for host in groups['keystone'] %} {% if inventory_hostname != host %} -/usr/bin/rsync -azu --delete -e 'ssh -i /var/lib/keystone/.ssh/id_rsa -p {{ keystone_ssh_port }} -F /var/lib/keystone/.ssh/config' keystone@{{ host }}:/etc/keystone/fernet-keys/ /etc/keystone/fernet-keys +/usr/bin/rsync -azu --delete -e 'ssh -i /var/lib/keystone/.ssh/id_rsa -p {{ hostvars[host]['keystone_ssh_port'] }} -F /var/lib/keystone/.ssh/config' keystone@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:/etc/keystone/fernet-keys/ /etc/keystone/fernet-keys {% endif %} {% endfor %} diff --git a/ansible/roles/keystone/templates/fernet-rotate.sh.j2 b/ansible/roles/keystone/templates/fernet-rotate.sh.j2 index 28c5b6f670..9f6cf8c955 100644 --- a/ansible/roles/keystone/templates/fernet-rotate.sh.j2 +++ b/ansible/roles/keystone/templates/fernet-rotate.sh.j2 @@ -4,6 +4,6 @@ keystone-manage --config-file /etc/keystone/keystone.conf fernet_rotate --keysto {% for host in groups['keystone'] %} {% if inventory_hostname != host %} -/usr/bin/rsync -az -e 'ssh -i /var/lib/keystone/.ssh/id_rsa -p {{ keystone_ssh_port }} -F /var/lib/keystone/.ssh/config' --delete /etc/keystone/fernet-keys/ keystone@{{ host }}:/etc/keystone/fernet-keys +/usr/bin/rsync -az -e 'ssh -i /var/lib/keystone/.ssh/id_rsa -p {{ hostvars[host]['keystone_ssh_port'] }} -F /var/lib/keystone/.ssh/config' --delete /etc/keystone/fernet-keys/ keystone@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:/etc/keystone/fernet-keys {% endif %} {% endfor %}