vagrant-capistrano 0.2.2 → 0.2.3
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.
- checksums.yaml +4 -4
- data/README.md +20 -29
- data/lib/vagrant/capistrano/config.rb +3 -0
- data/lib/vagrant/capistrano/provisioner.rb +1 -0
- data/lib/vagrant/capistrano/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42eea4ad4c923b083bdb3587bb9ee4da6d114708
|
4
|
+
data.tar.gz: 5e9d728af24c2bc0a9909e11c3084586988e6dac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 704d70c29028e80fbd7a1347a3627df563977566dedbb12580a3524bf6b3ccf1bac6f5cdba753aabfb422baffe73ae4d8f44e8e60c2c255ab37706bade77c618
|
7
|
+
data.tar.gz: 7a8396ce71c3729156b48b0bf683c35024678b418e8bd3bf85ec75b2d55a3fcb213a9e5628c0eee070cc5547f5edd79ec86fd02ac83155378b089eb03503fe7b
|
data/README.md
CHANGED
@@ -10,43 +10,34 @@ vagrant plugin install vagrant-capistrano
|
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
13
|
+
config.vm.provision "capistrano" do |cap|
|
14
|
+
cap.capfile = '../some-project/Capfile'
|
15
|
+
cap.rubystring = 'ruby-2.0.0-p458@gemset'
|
16
|
+
cap.stage = 'testing'
|
17
|
+
cap.tasks = ['rvm:install']
|
18
|
+
cap.environment = { 'ENV_VAR' => 'VALUE' }
|
19
|
+
cap.hiera_root = '../hiera'
|
20
|
+
end
|
21
21
|
|
22
22
|
This provisioner will set the following environment variables before executing capistrano:
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
HOSTS= IP address and port of the vagrant ssh daemon
|
28
|
-
```
|
24
|
+
DEPLOYMENT_USER = 'vagrant' (or whatever the vagrant ssh user is set to)
|
25
|
+
SSH_IDENTITY = private ssh key of the DEPLOYMENT_USER
|
26
|
+
HOSTS= IP address and port of the vagrant ssh daemon
|
29
27
|
|
30
28
|
In order for this plugin to successfully execute your capsitrano tasks, should your include the following in your Capfile (or deploy.rb):
|
31
29
|
|
32
|
-
|
33
|
-
|
34
|
-
set :
|
35
|
-
set :user, ENV['DEPLOYMENT_USER'] || "deployment"
|
36
|
-
```
|
37
|
-
|
38
|
-
This provisioner will cd into the directory containing your Capfile, then perform
|
30
|
+
# required for vagrant
|
31
|
+
set :ssh_options, { keys: [ENV['SSH_IDENTITY']] } if ENV['SSH_IDENTITY']
|
32
|
+
set :user, ENV['DEPLOYMENT_USER'] || "deployment"
|
39
33
|
|
40
|
-
|
41
|
-
|
42
|
-
cap (stage) deploy:setup
|
43
|
-
```
|
44
|
-
|
45
|
-
then any capistrano tasks in post_setup_tasks, followed by
|
34
|
+
This provisioner will cd into the directory containing your Capfile, then perform the tasks listed in the cap.tasks array. If
|
35
|
+
omitted, it defaults to:
|
46
36
|
|
47
|
-
|
48
|
-
cap (stage)
|
49
|
-
|
37
|
+
cap (stage) misc:update_needed? rvm:install_ruby deploy:setup deploy
|
38
|
+
cap (stage) rvm:install_ruby
|
39
|
+
cap (stage) deploy:setup
|
40
|
+
cap (stage) deploy
|
50
41
|
|
51
42
|
## Contributing
|
52
43
|
|
@@ -10,6 +10,7 @@ module VagrantPlugins
|
|
10
10
|
attr_accessor :tasks
|
11
11
|
attr_accessor :environment
|
12
12
|
attr_accessor :hiera_root
|
13
|
+
attr_accessor :hiera_role
|
13
14
|
|
14
15
|
def initialize
|
15
16
|
@capfile = UNSET_VALUE
|
@@ -18,6 +19,7 @@ module VagrantPlugins
|
|
18
19
|
@tasks = UNSET_VALUE
|
19
20
|
@environment = UNSET_VALUE
|
20
21
|
@hiera_root = UNSET_VALUE
|
22
|
+
@hiera_role = UNSET_VALUE
|
21
23
|
end
|
22
24
|
|
23
25
|
def finalize!
|
@@ -27,6 +29,7 @@ module VagrantPlugins
|
|
27
29
|
@tasks = ['misc:update_needed?', 'rvm:install_ruby','deploy:setup','deploy'] if @tasks == UNSET_VALUE
|
28
30
|
@environment = {} if @environment == UNSET_VALUE
|
29
31
|
@hiera_root = nil if @hiera_root == UNSET_VALUE
|
32
|
+
@hiera_role = nil if @hiera_role == UNSET_VALUE
|
30
33
|
end
|
31
34
|
|
32
35
|
|
@@ -16,6 +16,7 @@ module VagrantPlugins
|
|
16
16
|
"SSH_IDENTITY" => @machine.ssh_info[:private_key_path].join(":"),
|
17
17
|
"HOSTS" => "#{@machine.ssh_info[:host]}:#{@machine.ssh_info[:port]}",
|
18
18
|
"HIERA_ROOT" => File.expand_path(@config.hiera_root),
|
19
|
+
"HIERA_ROLE" => @config.hiera_role,
|
19
20
|
"HIERA_CONFIG_PATH" => File.join(File.expand_path(@config.hiera_root),'hiera.yaml')
|
20
21
|
}.merge(@config.environment)
|
21
22
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-capistrano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Skinner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|