vagrant-packet 0.1.5 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 215466bb44bc21972757b4a477870d4cfcd06f36050f9b2fab97145fd929f508
4
- data.tar.gz: 2828be49bd71c3125528a7112e6f8018a5a6a9b2e58751a4f344165aad0ece2c
3
+ metadata.gz: c44ced74f0f10f6caff0f67a1620cf82e3e2bf8c3ed81d2678541c5a1f9bdef3
4
+ data.tar.gz: 83f3ccd087698f06a950fe85beac1952849d2543b5e270facea10fbfed0a126e
5
5
  SHA512:
6
- metadata.gz: 5b4aad1cba63a52193490dfc7a75fd167d7d091f0554fc2f1726dea401ebf2d1313c97894b2c711c40cb48bb368f9381e3e8bc2f934d22110aa2e933cbac0c80
7
- data.tar.gz: 2fbc46596517976adc542aa971c91e5453f4eb906f58f4681be85650f8b66edbfebe74ddf8c8d0b551b0ff2c1ac8fe6d9dd2ce2f73a2802b94177d22f46bbd34
6
+ metadata.gz: a21d2d8d923ecbad0ece4afbd8b964ce94c169de2e12266a0183e5ab445fc2d3c06d4380d9833efc6cc02a7ec38df086986bcc6905b8cab9be33f2d7f5933412
7
+ data.tar.gz: ce1cee04061cd4ae41ed19979921ec9f7370872ec80d4b3f0b26f192f1509a311543f8518515bf484f31bf702963ba4777357e6ab307074e0b52c7e3edab56ab
data/.gitignore CHANGED
@@ -12,6 +12,8 @@ pkg/*
12
12
  tags
13
13
  Gemfile.lock
14
14
  vendor
15
+ bin
16
+ .gems
15
17
 
16
18
  # Vagrant
17
19
  .vagrant
@@ -0,0 +1 @@
1
+ .gems
data/README.md CHANGED
@@ -27,10 +27,14 @@ Vagrant.configure("2") do |config|
27
27
  config.vm.provider :packet do |packet, override|
28
28
  # Create an API token within Packet
29
29
  # See https://help.packet.net/quick-start/api-integrations
30
+ # This can be read from the Environment Variable "PACKET_TOKEN".
31
+ # Setting via Environment variable is preferred to prevent possible secret leakage.
30
32
  packet.packet_token = "YOUR_PACKET_API_TOKEN"
31
33
 
32
34
  # Get your project ID
33
35
  # See https://help.packet.net/faq/onboarding/portal
36
+ # This can be read from the Environment Variable "PACKET_PROJECT_ID"
37
+ # Setting via Environment variable is preferred to prevent possible secret leakage.
34
38
  packet.project_id = "YOUR_PACKET_PROJECT_ID"
35
39
 
36
40
  # Example: sjc1
@@ -31,8 +31,8 @@ module VagrantPlugins
31
31
 
32
32
  # Launch!
33
33
  env[:ui].info(I18n.t('vagrant_packet.launching_instance'))
34
- env[:ui].info(" -- Project: #{machine.provider_config.project_id}")
35
- env[:ui].info(" -- Facility: #{machine.provider_config.facility}")
34
+ env[:ui].info(" -- Project: #{machine.provider_config.project_id}") unless ENV['PACKET_PROJECT_ID']
35
+ env[:ui].info(" -- Facility: #{machine.provider_config.facility}") unless ENV['PACKET_FACILITY']
36
36
  env[:ui].info(" -- OS: #{machine.provider_config.operating_system}")
37
37
  env[:ui].info(" -- Machine: #{machine.provider_config.plan}")
38
38
 
@@ -54,27 +54,28 @@ module VagrantPlugins
54
54
  end
55
55
 
56
56
  def finalize!
57
- @packet_token = nil if @packet_token == UNSET_VALUE
57
+ @packet_token = (ENV['PACKET_TOKEN'] || nil) if @packet_token == UNSET_VALUE
58
58
  @instance_ready_timeout = 600 if @instance_ready_timeout == UNSET_VALUE
59
59
  @instance_check_interval = 10 if @instance_check_interval == UNSET_VALUE
60
- @project_id = nil if @project_id == UNSET_VALUE
60
+ @project_id = (ENV['PACKET_PROJECT_ID'] || nil) if @project_id == UNSET_VALUE
61
61
  @hostname = nil if @hostname == UNSET_VALUE
62
- @plan = nil if @plan == UNSET_VALUE
63
- @facility = nil if @facility == UNSET_VALUE
62
+ @plan = (ENV['PACKET_PLAN'] || nil) if @plan == UNSET_VALUE
63
+ @facility = (ENV['PACKET_FACILITY'] || nil) if @facility == UNSET_VALUE
64
64
  @operating_system = 'ubuntu_16_04' if @operating_system == UNSET_VALUE
65
65
  @description = nil if @description == UNSET_VALUE
66
- @billing_cycle = nil if @billing_cycle == UNSET_VALUE
66
+ @billing_cycle = (ENV['PACKET_BILLING_CYCLE'] || nil) if @billing_cycle == UNSET_VALUE
67
67
  @always_pxe = nil if @always_pxe == UNSET_VALUE
68
68
  @ipxe_script_url = nil if @ipxe_script_url == UNSET_VALUE
69
69
  @userdata = nil if @userdata == UNSET_VALUE
70
70
  @locked = nil if @locked == UNSET_VALUE
71
- @hardware_reservation_id = nil if @hardware_reservation_id == UNSET_VALUE
71
+ @hardware_reservation_id = (ENV['PACKET_HARDWARE_RESERVATION_ID'] || nil) if
72
+ @hardware_reservation_id == UNSET_VALUE
72
73
  @spot_instance = nil if @spot_instance == UNSET_VALUE
73
74
  @spot_price_max = nil if @spot_price_max == UNSET_VALUE
74
75
  @termination_time = nil if @termination_time == UNSET_VALUE
75
76
  @tags = nil if @tags == UNSET_VALUE
76
- @project_ssh_keys = nil if @project_ssh_keys == UNSET_VALUE
77
- @user_ssh_keys = nil if @user_ssh_keys == UNSET_VALUE
77
+ @project_ssh_keys = (ENV['PACKET_PROJECT_SSH_KEYS'] || nil) if @project_ssh_keys == UNSET_VALUE
78
+ @user_ssh_keys = (ENV['PACKET_USER_SSH_KEYS'] || nil) if @user_ssh_keys == UNSET_VALUE
78
79
  @features = nil if @features == UNSET_VALUE
79
80
  end
80
81
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module VagrantPlugins
4
4
  module Packet
5
- VERSION = '0.1.5'
5
+ VERSION = '0.1.6'
6
6
  end
7
7
  end
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.required_rubygems_version = '>= 1.3.6'
18
18
  s.rubyforge_project = 'vagrant-packet'
19
19
 
20
- s.add_runtime_dependency 'fog-packet', '~> 1.0.1'
20
+ s.add_runtime_dependency 'fog-packet', '~> 1.0'
21
21
 
22
22
  s.add_development_dependency 'rake', '~> 12.3'
23
23
  s.add_development_dependency 'rspec', '>= 3.5.0', '<= 3.6'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-packet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeffrey Sica
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-01 00:00:00.000000000 Z
11
+ date: 2018-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-packet
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.1
19
+ version: '1.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.1
26
+ version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -107,6 +107,7 @@ extensions: []
107
107
  extra_rdoc_files: []
108
108
  files:
109
109
  - ".gitignore"
110
+ - ".rbenv-gemsets"
110
111
  - ".rspec"
111
112
  - ".rubocop.yml"
112
113
  - ".travis.yml"