Permalink
Browse files

use pit to read client_id and api_key

  • Loading branch information...
nkwhr committed Apr 8, 2014
1 parent ebab85b commit 8fd84d91d65c343bd190b6f573f7f0eb3a559533
Showing with 6 additions and 3 deletions.
  1. +6 −3 Vagrantfile
View
@@ -1,10 +1,13 @@
+require 'pit'
+api_config = Pit.get('digital_ocean')
+
Vagrant.configure('2') do |config|
config.vm.hostname = 'test001.foobar.com' # 好きなhostnameに変更
config.vm.provider :digital_ocean do |provider, override|
- provider.client_id = 'set_your_client_id' # https://cloud.digitalocean.com/api_access で取得したclient_idを指定
- provider.api_key = 'set_your_api_key' # https://cloud.digitalocean.com/api_access で取得したapi_keyを指定
- provider.ssh_key_name = 'set_your_ssh_key' # https://cloud.digitalocean.com/ssh_keys で設定したSSH鍵名を指定
+ provider.client_id = api_config['CLIENT_ID'] # https://cloud.digitalocean.com/api_access で取得したclient_idを指定
+ provider.api_key = api_config['API_KEY'] # https://cloud.digitalocean.com/api_access で取得したapi_keyを指定
+ provider.ssh_key_name = 'set_your_ssh_key' # https://cloud.digitalocean.com/ssh_keys で設定したSSH鍵名を指定
override.ssh.private_key_path = '~/.ssh/id_rsa'
override.vm.box = 'digital_ocean'

0 comments on commit 8fd84d9

Please sign in to comment.