Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Commit

Permalink
Move subscription-manager auto-attach parameter in subscription file
Browse files Browse the repository at this point in the history
subscription_data.csv.sample got an extra parameter.
We can use this extra parameter to subscribe with activationkey for example.

extra,--activationkey='...' --org='...'

If we do so, roles/redhat_subscription/tasks/main.yml:46 raise an error:

    "Error: Activation keys cannot be used with --auto-attach."

Move --auto-attach in subscription file sample.
Remove --force because extra param is already set

This PR fixes #249
  • Loading branch information
rh-gvincent committed Sep 22, 2017
1 parent 7f3cca5 commit ce4ed93
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ baseurl,https://cdn.redhat.com
serverurl,subscription.rhn.redhat.com:443/subscription
username,[email protected]
password,yourPa$sW0rd
extra,--force
extra,--auto-attach --force
2 changes: 1 addition & 1 deletion roles/redhat_subscription/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

- name: Register with subscription-manager
command: >
subscription-manager register --auto-attach --force
subscription-manager register
--baseurl="{{ lookup('csvfile', 'baseurl file={} delimiter=,'.format(subscription_file)) }}"
--serverurl="{{ lookup('csvfile', 'serverurl file={} delimiter=,'.format(subscription_file)) }}"
--username="$USERNAME"
Expand Down

0 comments on commit ce4ed93

Please sign in to comment.