From 46372842e8fe3b299a15c6c72f2efb0683530c0c Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Thu, 2 Apr 2015 14:16:43 -0600 Subject: [PATCH] redhat_subscription: fix activationkeys argument Prior to this commit, Ansible would pass '--activationkeys ' as a literal string, which the remote server would interpret as a single argument to subscription-manager. This led to the following failure message when using an activation key: subscription-manager: error: no such option: --activationkey "mykey" Update the arguments so that the remote server will properly interpret them as two separate values. --- lib/ansible/modules/packaging/os/redhat_subscription.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/packaging/os/redhat_subscription.py b/lib/ansible/modules/packaging/os/redhat_subscription.py index b5205edc8b..9e0d2f6a2b 100644 --- a/lib/ansible/modules/packaging/os/redhat_subscription.py +++ b/lib/ansible/modules/packaging/os/redhat_subscription.py @@ -207,7 +207,7 @@ class Rhsm(RegistrationBase): # Generate command arguments if activationkey: - args.append('--activationkey "%s"' % activationkey) + args.extend(['--activationkey', activationkey]) else: if autosubscribe: args.append('--autosubscribe')