oci-fernet-keys-rotate 446 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/bin/sh

set -e

ME=$(hostname)
HOSTLIST=$(cat /etc/hosts | grep controller | awk '{print $2}')

keystone-manage --config-file /etc/keystone/keystone.conf fernet_rotate --keystone-user keystone --keystone-group keystone
for i in ${HOSTLIST} ; do
	if ! [ "${i}" = "${ME}" ] ; then
		rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' -avz --delete /etc/keystone/fernet-keys/ root@${i}:/etc/keystone/fernet-keys/
	fi
done