From 07b433345fdb15adfb5726ef23600d8be927ba01 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Thu, 21 Feb 2019 20:44:33 -0700 Subject: [PATCH] Add cwd grain for working directory --- salt/grains/core.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/salt/grains/core.py b/salt/grains/core.py index d9fbfaf00619..93fafef4c145 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py @@ -2373,6 +2373,13 @@ def get_machine_id(): return {'machine_id': machineid.read().strip()} +def cwd(): + ''' + Current working directory + ''' + return {'cwd': os.getcwd()} + + def path(): ''' Return the path