Sha256: 8dcf1a91f61867885b868e9bf3ea1cca3f10e4f6a686b4732cf3a7df8066b0d6
Contents?: true
Size: 643 Bytes
Versions: 2
Compression:
Stored size: 643 Bytes
Contents
module VagrantPlugins module GuestRedHat module Cap class Register def self.register(machine) username = machine.config.registration.subscriber_username password = machine.config.registration.subscriber_password command = "subscription-manager register --username=#{username} --password=#{password} --auto-attach #{"--force" if machine.config.registration.force}" machine.communicate.execute("cmd=$(#{command}); if [ \"$?\" != \"0\" ]; then echo $cmd | grep 'This system is already registered' || (echo $cmd 1>&2 && exit 1) ; fi", sudo: true) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vagrant-registration-0.0.8 | plugins/guests/redhat/cap/register.rb |
vagrant-registration-0.0.7 | plugins/guests/redhat/cap/register.rb |