vagrant-yaybu 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/vagrant-yaybu/provisioner.rb +19 -14
- data/lib/vagrant-yaybu/version.rb +1 -1
- metadata +1 -1
@@ -82,6 +82,8 @@ module Vagrant
|
|
82
82
|
attr_accessor :include
|
83
83
|
|
84
84
|
def initialize
|
85
|
+
super
|
86
|
+
|
85
87
|
@yay = ""
|
86
88
|
@python = "python"
|
87
89
|
@searchpath = []
|
@@ -89,16 +91,19 @@ module Vagrant
|
|
89
91
|
end
|
90
92
|
end
|
91
93
|
|
94
|
+
def self.config_class
|
95
|
+
Config
|
96
|
+
end
|
97
|
+
|
92
98
|
def bootstrap
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
end
|
99
|
+
ssh = env[:vm].channel
|
100
|
+
begin
|
101
|
+
ssh.sudo("which yaybu", :error_class => YaybuError, :_key => :yaybu_not_detected, :binary => "yaybu")
|
102
|
+
rescue
|
103
|
+
env[:ui].info "Yaybu not found so attempting to install it"
|
104
|
+
ssh.sudo("apt-get update")
|
105
|
+
ssh.sudo("apt-get install python-setuptools -y")
|
106
|
+
ssh.sudo("easy_install Yaybu")
|
102
107
|
end
|
103
108
|
end
|
104
109
|
|
@@ -126,10 +131,10 @@ module Vagrant
|
|
126
131
|
bootstrap
|
127
132
|
|
128
133
|
deployment_script = TemplateRenderer.render_string($deploy_script, {
|
129
|
-
:ssh_host => vm.
|
130
|
-
:ssh_user => vm.
|
131
|
-
:ssh_port => vm.ssh.port,
|
132
|
-
:private_key_path => vm.
|
134
|
+
:ssh_host => env[:vm].ssh.info[:host],
|
135
|
+
:ssh_user => env[:vm].ssh.info[:username],
|
136
|
+
:ssh_port => env[:vm].ssh.info[:port],
|
137
|
+
:private_key_path => env[:vm].ssh.info[:private_key_path],
|
133
138
|
:yay => config.yay,
|
134
139
|
:searchpath => config.searchpath,
|
135
140
|
:includes => config.include,
|
@@ -140,7 +145,7 @@ module Vagrant
|
|
140
145
|
io.close_write
|
141
146
|
|
142
147
|
while line = io.gets do
|
143
|
-
env
|
148
|
+
env[:ui].info("#{line}")
|
144
149
|
end
|
145
150
|
end
|
146
151
|
end
|