sambot 0.1.187 → 0.1.188

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
  SHA1:
3
- metadata.gz: 15bdced9b425e53722799a5700e8988f4ad2a9f8
4
- data.tar.gz: 2d5e0064c207d0264000863742d1aafd2f545e9f
3
+ metadata.gz: 89a94e7b14c4f19225903d04f98a42b61ae92236
4
+ data.tar.gz: 79b6207796829aadc1fae4ead85c4ee82f8f66d5
5
5
  SHA512:
6
- metadata.gz: 84b277cd83ff6666840a3ad73a44b7ad12331972e3ffb9e07c85b7554fa59b2e144c0c42c10ef8b985fa53967fdd64bf87bd1b34f460c9e1c56bef7ca546e2bf
7
- data.tar.gz: 04112c19c6f535d769be1d163a77619e1e1ec439be2a119ebc498a143d399984fa9a6ee15ca2a46de563910dee461f46ddc4c1f9f9c60868decb1be686088577
6
+ metadata.gz: e2f8f61397f4515465cd427a2cfe5d69a87080fc537f8e8dce4a10380c36689c7dea7cdc02c850f6f5094de904c8b448f834ec0e51329a06c70769bf947c5faf
7
+ data.tar.gz: 5e3b7d5ce422ee3a1dae3cbe8f417e7ea3f6b2a6bf9a712a2ee718b843b8f32fcc6618b8857a6849f413254523b787b66221dbfc9776a10d08600e099a48116b
@@ -89,12 +89,17 @@ Vagrant.configure("2") do |c|
89
89
  <% end %>
90
90
 
91
91
  #################################################################################
92
- # The steps below run the bootstrap script for th newly created boxes. #
92
+ # The steps below run the bootstrap script for the newly created boxes. #
93
93
  # As part of the bootstrapping, a wrapped token is generated and given to #
94
94
  # bootstrap script. #
95
95
  #################################################################################
96
+ <%
97
+ puts 'Generating the wrapped token to pass in to the bootstrap script'
98
+ token = ::Sambot::Testing::VaultHelper.generate_wrapped_token
99
+ puts 'The token generated was ' + token
100
+ %>
96
101
  <% if config[:box] =~ /centos/ %>
97
- c.vm.provision "shell", inline: "bash /vagrant/bootstrap.sh <%= ::Sambot::Testing::VaultHelper.generate_wrapped_token %>"
102
+ c.vm.provision "shell", inline: "bash /vagrant/bootstrap.sh \"<%= token %>\""
98
103
  <% else %>
99
104
  c.vm.provision "shell", inline: "powershell -ExecutionPolicy Bypass -File C:/Vagrant/bootstrap.ps1"
100
105
  <% end %>
@@ -61,16 +61,22 @@ export VAULT_TOKEN=root
61
61
  # the Vault server. #
62
62
  #################################################################################
63
63
 
64
- echo "Create the addressing file so that Chef and other applications can access the Vault server"
64
+ echo "Create the tokens.json file so that Chef and other applications can access the Vault server"
65
65
  cat << EOF > /etc/vault/tokens.json
66
66
  {
67
67
  "vault-addr": "${VAULT_ADDR}",
68
68
  "skip-verify": true,
69
- "wrapped": "",
70
- "access": "root"
69
+ "wrapped": "$1",
70
+ "access": ""
71
71
  }
72
72
  EOF
73
73
 
74
+ #################################################################################
75
+ # Display the contents of /etc/vault/tokens.json for debugging. #
76
+ #################################################################################
77
+
78
+ less /etc/vault/tokens.json
79
+
74
80
  #################################################################################
75
81
  # Create the 'vault-tokens' group so other services/applications apart from #
76
82
  # 'root' can access the file. #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sambot
4
- VERSION = '0.1.187'.freeze
4
+ VERSION = '0.1.188'.freeze
5
5
  end
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.187
4
+ version: 0.1.188
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Kouame