sambot 0.1.119 → 0.1.121

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: 342d7865229462085d3ca19c2bf0d564fa9ad429
4
- data.tar.gz: eda38e4802e8b28b14b549cdd24fe9a4f719d979
3
+ metadata.gz: 914922a1e3d87eb7e5b5c207a41dd88dc1b0998c
4
+ data.tar.gz: 9267e25c69db1c219ec06d79c42bef41ce518484
5
5
  SHA512:
6
- metadata.gz: b54678af1feb81af52459d1e9e6a64bd2005732a326b97a00b914eb3c7d58b655c05a247e8c86ef06ca441cd5f3f7620536f2d32d6dec973fdbaf13645a98312
7
- data.tar.gz: 1d3c82b900f618e1e1a3c532b5abed62957381dd45fd50e15cf61115e65c84d3d78b40fff425140586ad88314abdfcd0cd55c722ea4e1811a7a7efc13f223b82
6
+ metadata.gz: dea64fb1138f4e55f4991c965adcc46b537bb11711d7402c41fe3050cb06f41ffd91574cc3dc588265eafb3c54c79da386445a8080acbda9220bfc9368394ee0
7
+ data.tar.gz: fb656a94088f1191d0e35c4da0ea63c61d0e7eeeb73430668cb64b47671f55b0ce720456562b139db66a5b2b53cc4935bf8215f212b0ae03d0b2865c0084e469
@@ -1,5 +1,5 @@
1
1
  <% config[:vagrantfiles].each do |vagrantfile| %>
2
- require "<%= vagrantfile %>"
2
+ require "<%= vagrantfile %>"
3
3
  <% end %>
4
4
 
5
5
  Vagrant.configure("2") do |c|
@@ -12,132 +12,91 @@ Vagrant.configure("2") do |c|
12
12
 
13
13
  c.vm.box = "<%= config[:box] %>"
14
14
 
15
- <% if config[:box_url] %>
16
- c.vm.box_url = "<%= config[:box_url] %>"
17
- <% end %>
15
+ <% if config[:box_url] %>
16
+ c.vm.box_url = "<%= config[:box_url] %>"
17
+ <% end %>
18
18
 
19
- <% if config[:box_version] %>
20
- c.vm.box_version = "<%= config[:box_version] %>"
21
- <% end %>
19
+ <% if config[:box_version] %>
20
+ c.vm.box_version = "<%= config[:box_version] %>"
21
+ <% end %>
22
22
 
23
- <% if !config[:box_check_update].nil? %>
24
- c.vm.box_check_update = <%= config[:box_check_update] %>
25
- <% end %>
23
+ <% if !config[:box_check_update].nil? %>
24
+ c.vm.box_check_update = <%= config[:box_check_update] %>
25
+ <% end %>
26
26
 
27
- <% if !config[:box_download_ca_cert].nil? %>
28
- c.vm.box_download_ca_cert = "<%= config[:box_download_ca_cert] %>"
29
- <% end %>
27
+ <% if !config[:box_download_ca_cert].nil? %>
28
+ c.vm.box_download_ca_cert = "<%= config[:box_download_ca_cert] %>"
29
+ <% end %>
30
30
 
31
- <% if !config[:box_download_insecure].nil? %>
32
- c.vm.box_download_insecure = "<%= config[:box_download_insecure] %>"
33
- <% end %>
31
+ <% if !config[:box_download_insecure].nil? %>
32
+ c.vm.box_download_insecure = "<%= config[:box_download_insecure] %>"
33
+ <% end %>
34
34
 
35
- <% if config[:vm_hostname] %>
36
- c.vm.hostname = "<%= config[:vm_hostname] %>"
37
- <% end %>
35
+ <% if config[:vm_hostname] %>
36
+ c.vm.hostname = "<%= config[:vm_hostname] %>"
37
+ <% end %>
38
38
 
39
- <% if config[:communicator] %>
40
- c.vm.communicator = "<%= config[:communicator] %>"
41
- <% end %>
39
+ <% if config[:communicator] %>
40
+ c.vm.communicator = "<%= config[:communicator] %>"
41
+ <% end %>
42
42
 
43
- <% if config[:guest] %>
44
- c.vm.guest = "<%= config[:guest] %>"
45
- <% end %>
43
+ <% if config[:guest] %>
44
+ c.vm.guest = "<%= config[:guest] %>"
45
+ <% end %>
46
46
 
47
- <% if config[:communicator] %>
48
- <% if config[:username] %>
49
- c.<%= config[:communicator] %>.username = "<%= config[:username] %>"
47
+ <% if config[:communicator] %>
48
+ <% if config[:username] %>
49
+ c.<%= config[:communicator] %>.username = "<%= config[:username] %>"
50
+ <% end %>
51
+ <% if config[:password] %>
52
+ c.<%= config[:communicator] %>.password = "<%= config[:password] %>"
53
+ <% end %>
54
+ <% else %>
55
+ <% if config[:username] %>
56
+ c.ssh.username = "<%= config[:username] %>"
57
+ <% end %>
58
+ <% if config[:password] %>
59
+ c.ssh.password = "<%= config[:password] %>"
60
+ <% end %>
50
61
  <% end %>
51
- <% if config[:password] %>
52
- c.<%= config[:communicator] %>.password = "<%= config[:password] %>"
62
+
63
+ <% if config[:ssh_key] %>
64
+ c.ssh.private_key_path = "<%= config[:ssh_key] %>"
53
65
  <% end %>
54
- <% else %>
55
- <% if config[:username] %>
56
- c.ssh.username = "<%= config[:username] %>"
66
+ <% config[:ssh].each do |key, value| %>
67
+ c.ssh.<%= key %> = <%= [true, false].include?(value) ? value : value.inspect %>
57
68
  <% end %>
58
- <% if config[:password] %>
59
- c.ssh.password = "<%= config[:password] %>"
69
+ <% if config[:winrm] %>
70
+ <% config[:winrm].each do |key, value| %>
71
+ c.winrm.<%= key %> = <%= value %>
72
+ <% end %>
60
73
  <% end %>
61
- <% end %>
62
74
 
63
- <% if config[:ssh_key] %>
64
- c.ssh.private_key_path = "<%= config[:ssh_key] %>"
65
- <% end %>
66
- <% config[:ssh].each do |key, value| %>
67
- c.ssh.<%= key %> = <%= [true, false].include?(value) ? value : value.inspect %>
68
- <% end %>
69
- <% if config[:winrm] %>
70
- <% config[:winrm].each do |key, value| %>
71
- c.winrm.<%= key %> = <%= value %>
75
+ <% if config[:boot_timeout] %>
76
+ c.vm.boot_timeout = <%= config[:boot_timeout] %>
72
77
  <% end %>
73
- <% end %>
74
78
 
75
- <% if config[:boot_timeout] %>
76
- c.vm.boot_timeout = <%= config[:boot_timeout] %>
77
- <% end %>
78
-
79
- <% Array(config[:network]).each do |opts| %>
80
- c.vm.network(:<%= opts[0] %>, <%= opts[1..-1].join(", ") %>)
81
- <% end %>
79
+ <% Array(config[:network]).each do |opts| %>
80
+ c.vm.network(:<%= opts[0] %>, <%= opts[1..-1].join(", ") %>)
81
+ <% end %>
82
82
 
83
83
  c.vm.synced_folder ".", "/vagrant", disabled: true
84
- <% config[:synced_folders].each do |source, destination, options| %>
85
- c.vm.synced_folder <%= source.inspect %>, <%= destination.inspect %>, <%= options %>
86
- <% end %>
87
-
88
- <% if config[:box] =~ /centos/ %>
89
- c.vm.provision "shell", inline: "bash /vagrant/bootstrap.sh"
90
- <% else %>
91
- c.vm.provision "shell", inline: "powershell -ExecutionPolicy Bypass -File C:/Vagrant/bootstrap.ps1"
92
- <% end %>
84
+ <% config[:synced_folders].each do |source, destination, options| %>
85
+ c.vm.synced_folder <%= source.inspect %>, <%= destination.inspect %>, <%= options %>
86
+ <% end %>
93
87
 
94
- c.vm.provider :<%= config[:provider] %> do |p|
95
- <% case config[:provider]
96
- when "virtualbox", /^vmware_/
97
- if config[:gui] == true || config[:gui] == false %>
98
- p.gui = <%= config[:gui] %>
99
- <% end
100
- end
101
- case config[:provider]
102
- when "virtualbox", /^vmware_/, "parallels"
103
- if config[:linked_clone] == true || config[:linked_clone] == false %>
104
- p.linked_clone = <%= config[:linked_clone] %>
105
- <% end
106
- end %>
107
-
108
- <% config[:customize].each do |key, value| %>
109
- <% case config[:provider]
110
- when "virtualbox" %>
111
- <% if key == :createhd %>
112
- p.customize ["createhd", "--filename", "<%= value[:filename] %>", "--size", <%= value[:size] %>]
113
- <% elsif key == :storageattach %>
114
- <% options = [] %>
115
- <% value.each do |storageattach_option_key, storageattach_option_value|
116
- options << "\"--#{storageattach_option_key}\""
117
- if storageattach_option_value.instance_of? Fixnum
118
- options << storageattach_option_value
119
- else
120
- options << "\"#{storageattach_option_value}\""
121
- end
122
- end %>
123
- p.customize ["storageattach", :id, <%= options.join(', ') %>]
124
- <% elsif key == :cpuidset %>
125
- <% ids = [] %>
126
- <% value.each do | id |
127
- ids << "\"#{id}\""
128
- end %>
129
- p.customize ["modifyvm", :id, "--cpuidset", <%= ids.join(', ') %>]
130
- <% else %>
131
- p.customize ["modifyvm", :id, "--<%= key %>", "<%= value %>"]
132
- <% end %>
88
+ <% if config[:box] =~ /centos/ %>
89
+ c.vm.provision "file", source: "~/.vault-token", destination: "~/.vault-token"
90
+ c.vm.provision "shell", inline: "bash /vagrant/bootstrap.sh"
133
91
  <% else %>
134
- <% if value.is_a? String %>
135
- p.<%= key %> = "<%= value%>"
136
- <% else %>
137
- p.<%= key %> = <%= value%>
138
- <% end %>
92
+ c.vm.provision "shell", inline: "powershell -ExecutionPolicy Bypass -File C:/Vagrant/bootstrap.ps1"
139
93
  <% end %>
140
- <% end %>
94
+
95
+ c.vm.provider "virtualbox" do |p|
96
+ p.linked_clone = true
97
+ <% if config[:gui] == true || config[:gui] == false %>
98
+ p.gui = <%= config[:gui] %>
99
+ <% end %>
141
100
  end
142
101
 
143
102
  end
@@ -1,24 +1,9 @@
1
1
  #!/bin/bash -e
2
-
3
- export VAULT_ADDR=http://192.168.255.5:8200
4
- export VAULT_TOKEN=root
5
-
2
+ echo 'VAULT_SKIP_VERIFY=true' >> /etc/environment
3
+ echo 'VAULT_ADDR=https://vault.brighter.io:8200' >> /etc/environment
4
+ x=`ip route | awk '/default/ {print $3}'`
5
+ echo "$x vault.brighter.io" > /etc/hosts
6
6
  sudo yum install -y unzip
7
7
  wget "https://releases.hashicorp.com/vault/0.6.5/vault_0.6.5_linux_amd64.zip"
8
8
  unzip vault_0.6.5_linux_amd64.zip -d /usr/bin
9
9
  sudo mkdir /etc/vault
10
-
11
- token=$(vault token-create -policy=nightswatch-ro -role=nightswatch-ro -wrap-ttl=72h | awk '/^wrapping_token:/ {print $2}')
12
- cat << EOF > /etc/vault/tokens.json
13
- {
14
- "vault-addr": "${VAULT_ADDR}",
15
- "skip-verify": true,
16
- "wrapped": "${token}",
17
- "access": ""
18
- }
19
- EOF
20
-
21
- sudo mkdir -p /opt/as-vault-tool/1.0.2
22
- wget https://storage.googleapis.com/ads-devops-chef/as-vault-tool/1.0.2/linux_amd64.zip
23
- sudo unzip linux_amd64 -d /opt/as-vault-tool/1.0.2/
24
- sudo /opt/as-vault-tool/1.0.2/as-vault-tool tokenrenew
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sambot
4
- VERSION = '0.1.119'.freeze
4
+ VERSION = '0.1.121'.freeze
5
5
  end
@@ -26,7 +26,7 @@ module Sambot
26
26
  tunnel_port: 9001, dest_port: 8111, proxy_port: 443
27
27
  },
28
28
  'splunk.brighter.io': {
29
- tunnel_port: 9002, dest_port: 8000, proxy_port: 443
29
+ tunnel_port: 9002, dest_port: 8080, proxy_port: 443
30
30
  },
31
31
  'vault.brighter.io': {
32
32
  tunnel_port: 9003, dest_port: 8200, proxy_port: 8200
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sambot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.119
4
+ version: 0.1.121
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Kouame