Module: VagrantPlugins::Secret

Defined in:
lib/vagrant-secret.rb,
lib/vagrant-secret/plugin.rb,
lib/vagrant-secret/command.rb,
lib/vagrant-secret/version.rb

Defined Under Namespace

Classes: Command, Plugin

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.called_rootObject



12
13
14
# File 'lib/vagrant-secret.rb', line 12

def self.called_root
  Pathname.pwd
end

.generate_secretObject



16
17
18
19
20
21
22
23
24
# File 'lib/vagrant-secret.rb', line 16

def self.generate_secret
  content = <<-EOF
# Write your secret settings here.
password: "*****"
EOF
  File.open(secret_file,'w') do |f|
    f.puts content
  end
end

.secret_fileObject



8
9
10
# File 'lib/vagrant-secret.rb', line 8

def self.secret_file
  called_root.join(".vagrant/secret.yaml")
end