From: Patrick Donnelly Date: Sat, 26 Jan 2019 02:48:28 +0000 (-0800) Subject: use shortname in keyring path X-Git-Tag: v4.0.0beta1~39 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8cd0308f5f570635d66295c442ea49dc2c043194;p=ceph-ansible.git use shortname in keyring path socket.gethostname may return a FQDN. Problem found in Linode. Signed-off-by: Patrick Donnelly --- diff --git a/library/ceph_key.py b/library/ceph_key.py index 41287c93e..bc49ae2b4 100644 --- a/library/ceph_key.py +++ b/library/ceph_key.py @@ -643,7 +643,7 @@ def run_module(): module, list_keys(cluster, user, user_key, container_image)) elif state == "fetch_initial_keys": - hostname = socket.gethostname() + hostname = socket.gethostname().split('.', 1)[0] user = "mon." user_key = os.path.join( "/var/lib/ceph/mon/" + cluster + "-" + hostname + "/keyring")