From: Patrick Donnelly Date: Sat, 26 Jan 2019 02:48:28 +0000 (-0800) Subject: use shortname in keyring path X-Git-Tag: v3.2.5~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=befdb1e48bc01d9f4d196a0f23a007c424f73916;p=ceph-ansible.git use shortname in keyring path socket.gethostname may return a FQDN. Problem found in Linode. Signed-off-by: Patrick Donnelly (cherry picked from commit 8cd0308f5f570635d66295c442ea49dc2c043194) --- diff --git a/library/ceph_key.py b/library/ceph_key.py index 9a77afa46..a5fd517c9 100644 --- a/library/ceph_key.py +++ b/library/ceph_key.py @@ -612,7 +612,7 @@ def run_module(): module, list_keys(cluster, user, user_key, containerized)) 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")