diff --git a/inventory_provider/tasks/config.py b/inventory_provider/tasks/config.py
index 89d3792f9d54c47d62f8fccdb400088bcfc3ee6f..9ed6681c289b99ac46ed4d71e0e7ebc5792a63f4 100644
--- a/inventory_provider/tasks/config.py
+++ b/inventory_provider/tasks/config.py
@@ -25,7 +25,7 @@ if broker_scheme == 'sentinel':
     broker_hostname = master[0]
     broker_port = master[1]
 
-if re.match('^[\d:]+$', broker_hostname):
+if re.match(r'^[\d:]+$', broker_hostname):
     # handle case where hostname is an ipv6 address
     broker_hostname = '[%s]' % broker_hostname