Class: DInstallerCli::Commands::RootUser

Inherits:
Thor
  • Object
show all
Defined in:
lib/dinstaller_cli/commands/root_user.rb

Overview

Subcommand to manage root user settings

Instance Method Summary collapse

Instance Method Details

#clearObject



43
44
45
# File 'lib/dinstaller_cli/commands/root_user.rb', line 43

def clear
  client.remove_root_info
end

#password(password = nil) ⇒ Object



37
38
39
40
# File 'lib/dinstaller_cli/commands/root_user.rb', line 37

def password(password = nil)
  client.root_password = password if password
  say("<secret>") if client.root_password?
end

#ssh_key(key = nil) ⇒ Object



31
32
33
34
# File 'lib/dinstaller_cli/commands/root_user.rb', line 31

def ssh_key(key = nil)
  client.root_ssh_key = key if key
  say(client.root_ssh_key)
end