From 009ac075b7de7450efddc1e097af0b2f9589c595 Mon Sep 17 00:00:00 2001
From: Brian Coca <brian.coca+git@gmail.com>
Date: Tue, 14 Feb 2017 14:37:10 -0500
Subject: [PATCH] expanded user facts to effective/real/saved

---
 lib/ansible/module_utils/facts.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py
index 077a5dd187..1f5b790d40 100644
--- a/lib/ansible/module_utils/facts.py
+++ b/lib/ansible/module_utils/facts.py
@@ -553,6 +553,8 @@ class Facts(object):
         self.facts['user_gecos'] = pwent.pw_gecos
         self.facts['user_dir'] = pwent.pw_dir
         self.facts['user_shell'] = pwent.pw_shell
+        (self.facts['real_user_id'], self.facts['effective_user_id'],  self.facts['saved_user_id']) = os.getresuid()
+        (self.facts['real_group_id'], self.facts['effective_group_id'],  self.facts['saved_group_id']) = os.getresgid()
 
     def get_env_facts(self):
         self.facts['env'] = {}