summaryrefslogtreecommitdiffstats
path: root/roles/subscription-manager
diff options
context:
space:
mode:
authorVinny Valdez <vvaldez@redhat.com>2016-04-23 12:50:25 -0500
committerVinny Valdez <vvaldez@redhat.com>2016-04-23 12:59:38 -0500
commit305140bfaeb6cd1bbe34279cbd6750d1136816d6 (patch)
tree719441308266b3ac57d4994b40a02a2ff148a172 /roles/subscription-manager
parent1882e5af783333273369399549e5e7fb6405e563 (diff)
downloadopenshift-305140bfaeb6cd1bbe34279cbd6750d1136816d6.tar.gz
openshift-305140bfaeb6cd1bbe34279cbd6750d1136816d6.tar.bz2
openshift-305140bfaeb6cd1bbe34279cbd6750d1136816d6.tar.xz
openshift-305140bfaeb6cd1bbe34279cbd6750d1136816d6.zip
Add org parameter to Satellite with user/pass
Diffstat (limited to 'roles/subscription-manager')
-rw-r--r--roles/subscription-manager/tasks/main.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/subscription-manager/tasks/main.yml b/roles/subscription-manager/tasks/main.yml
index bdb8ca7c4..9bc430665 100644
--- a/roles/subscription-manager/tasks/main.yml
+++ b/roles/subscription-manager/tasks/main.yml
@@ -77,6 +77,18 @@
when:
- not registered
- rhsm_authentication == "password"
+ - rhsm_org is not defined or rhsm_org is none or rhsm_org|trim == ''
+
+# This can apply to either Hosted or Satellite
+- name: "Register using username, password and organization"
+ command: "/usr/bin/subscription-manager register --username={{ rhsm_username }} --password={{ rhsm_password }} --org={{ rhsm_org }}"
+ no_log: true
+ when:
+ - not registered
+ - rhsm_authentication == "password"
+ - rhsm_org is defined
+ - rhsm_org is not none
+ - rhsm_org|trim != ''
- name: "Auto-attach to Subscription Manager Pool"
command: "/usr/bin/subscription-manager attach --auto"