vagrant-capistrano 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9fdf0b9b3305610260516e7411958d448b41258c
4
- data.tar.gz: b5bb020d1caee8dbf6989823ac148cffb23286c6
3
+ metadata.gz: 42eea4ad4c923b083bdb3587bb9ee4da6d114708
4
+ data.tar.gz: 5e9d728af24c2bc0a9909e11c3084586988e6dac
5
5
  SHA512:
6
- metadata.gz: cc3d55c1dfc73a4856e76a80a0247ffaaf937a1cfde870944a827651463c13404d93c9ff407a64471d2cbf5159f90fd0af3a923050ab6c19e61e30f41f531594
7
- data.tar.gz: 57d4cfdb1dbf3b09b031c2b18fb6f63d8bf710664eb11e5c714545924a5b687937d4354bd2466bd7eb2cece0c687cfdec153eabc54d05bae03852d6572ba1d1f
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
- ```ruby
14
- config.vm.provision "capistrano" do |cap|
15
- cap.capfile = '../some-project/Capfile'
16
- cap.rubystring = 'ruby-2.0.0-p458@project'
17
- cap.stage = 'testing'
18
- cap.post_setup_tasks = ['rvm:install']
19
- end
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
- DEPLOYMENT_USER = 'vagrant' (or whatever the vagrant ssh user is set to)
26
- SSH_IDENTITY = private ssh key of the DEPLOYMENT_USER
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
- ```ruby
33
- # required for vagrant
34
- set :ssh_options, { keys: [ENV['SSH_IDENTITY']] } if ENV['SSH_IDENTITY']
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
- cap (stage) rvm_install_ruby
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) deploy
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
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Capistrano
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
5
5
  end
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.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: 2014-08-08 00:00:00.000000000 Z
11
+ date: 2017-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler