kolla-ansible/ansible/roles/keystone/templates/fernet-rotate.sh.j2
Christian Berendt 6f8e354805 Use internal interface to connect with keystone_ssh
Change-Id: I1283014f785c2e6abf8db99c4fd71c008718a35e
Closes-bug: #1695102
2017-10-10 06:57:42 +00:00

10 lines
562 B
Django/Jinja

#!/bin/bash
keystone-manage --config-file /etc/keystone/keystone.conf fernet_rotate --keystone-user {{ keystone_username }} --keystone-group {{ keystone_groupname }}
{% for host in groups['keystone'] %}
{% if inventory_hostname != host %}
/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 %}