From ca3390377ac98cc447dcf0c0b90dbe2206533512 Mon Sep 17 00:00:00 2001
From: Martin Krizek <martin.krizek@gmail.com>
Date: Thu, 17 May 2018 20:44:06 +0200
Subject: [PATCH] redhat_subscription: C locale for stdout scraping (#40165)

---
 lib/ansible/modules/packaging/os/redhat_subscription.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/ansible/modules/packaging/os/redhat_subscription.py b/lib/ansible/modules/packaging/os/redhat_subscription.py
index df4e062ab0..dca3e67117 100644
--- a/lib/ansible/modules/packaging/os/redhat_subscription.py
+++ b/lib/ansible/modules/packaging/os/redhat_subscription.py
@@ -556,7 +556,8 @@ class RhsmPools(object):
             args += " --consumed"
         else:
             args += " --available"
-        rc, stdout, stderr = self.module.run_command(args, check_rc=True)
+        lang_env = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C')
+        rc, stdout, stderr = self.module.run_command(args, check_rc=True, environ_update=lang_env)
 
         products = []
         for line in stdout.split('\n'):