use shortname in keyring path

socket.gethostname may return a FQDN. Problem found in Linode.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 8cd0308f5f)
pull/3544/head
Patrick Donnelly 2019-01-25 18:48:28 -08:00 committed by mergify[bot]
parent 1877e1b330
commit befdb1e48b
1 changed files with 1 additions and 1 deletions

View File

@ -612,7 +612,7 @@ def run_module():
module, list_keys(cluster, user, user_key, containerized)) module, list_keys(cluster, user, user_key, containerized))
elif state == "fetch_initial_keys": elif state == "fetch_initial_keys":
hostname = socket.gethostname() hostname = socket.gethostname().split('.', 1)[0]
user = "mon." user = "mon."
user_key = os.path.join( user_key = os.path.join(
"/var/lib/ceph/mon/" + cluster + "-" + hostname + "/keyring") "/var/lib/ceph/mon/" + cluster + "-" + hostname + "/keyring")