From a94a3415825379d5001ae7de38931c0cc1d453ef Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 3 May 2021 14:31:28 -0400 Subject: [PATCH] Fix ansible path compatibility. --- confluent_server/confluent/selfservice.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/selfservice.py b/confluent_server/confluent/selfservice.py index 7d064e33..117e5697 100644 --- a/confluent_server/confluent/selfservice.py +++ b/confluent_server/confluent/selfservice.py @@ -271,8 +271,11 @@ def handle_request(env, start_response): scriptcat, cfg, nodename, '/var/lib/confluent/public/os/{0}/ansible/{1}') playlist = [] - dirname = '/var/lib/confluent/public/os/{0}/ansible/{1}.d/'.format( + dirname = '/var/lib/confluent/public/os/{0}/ansible/{1}/'.format( profile, scriptcat) + if not os.path.isdir(dirname): + dirname = '/var/lib/confluent/public/os/{0}/ansible/{1}.d/'.format( + profile, scriptcat) for filename in slist: if filename.endswith('.yaml') or filename.endswith('.yml'): playlist.append(os.path.join(dirname, filename))