sambot 0.1.139 → 0.1.140

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: 1796f56afff94228802fc2a26f7df73234c2c4b0
4
- data.tar.gz: af0d40157704499333c37f7f3185beda02522b34
3
+ metadata.gz: 4a527304ade136459c28b29152006319c9ad5596
4
+ data.tar.gz: 8ecfc7577f98d44e7e19846d420ed982ad98fa66
5
5
  SHA512:
6
- metadata.gz: 0e43182a75ad9f37771d06fbb5453a31f416268adc653bd1ef27c0091aadf89816b5564629b869ad1e934623fa53719c0e0bcec3d2ccd6f4e8ecad69bf9742b8
7
- data.tar.gz: 2acba0bb4c74774069efcfea070dd6085857c689a43b9f6c903b82f1124ff8fcaed7c87986bac597bfba3c26c2b17ac7ecf669ceb89c422c96a92af277ba3da2
6
+ metadata.gz: 69240de3b48ecee23cf9a5176b1bc98448049e139455d6bb1d8bd40cc523a766dbe0c7e2b6e0e500bf46d40b29ef0449ea215e260bfe222df797578df4ae5d99
7
+ data.tar.gz: 65cb09747286f0e8eccf6acefd78a4da23cc871d86ec39c2c5eba8fc6e20faa42d64f55b1b195f9bf2575f4bd32d97b6f175a989ead5a1d0559a425b0e8d1dfe
@@ -47,10 +47,19 @@ module Sambot
47
47
 
48
48
  def add_platform_identifier(value, platform)
49
49
  value['suites'].each do |config|
50
- config['attributes'] = config['attributes'] || {}
51
- config['attributes']['cloud_platform'] = platform
52
- config['attributes']['vault'] = config['attributes']['vault'] || {}
53
- config['attributes']['vault']['exec_renew'] = false
50
+ params = handle_custom_suites(config, platform)
51
+ params['attributes'] = params['attributes'] || {}
52
+ params['attributes']['cloud_platform'] = platform
53
+ params['attributes']['vault'] = params['attributes']['vault'] || {}
54
+ params['attributes']['vault']['exec_renew'] = false
55
+ end
56
+ end
57
+
58
+ def handle_custom_suites(config, platform)
59
+ if config['local'] && config['dev']
60
+ platform == 'LOCAL' ? config['local'] : config['dev']
61
+ else
62
+ config
54
63
  end
55
64
  end
56
65
 
@@ -1,7 +1,7 @@
1
1
  #!/bin/bash -e
2
2
 
3
3
  yum install -y unzip wget
4
- mkdir /etc/vault
4
+ if [ ! -d /etc/vault ]; then mkdir /etc/vault; fi
5
5
 
6
6
  token=$(vault token-create -policy=nightswatch-ro -role=nightswatch-ro -wrap-ttl=72h | awk '/^wrapping_token:/ {print $2}')
7
7
  cat << EOF > /etc/vault/tokens.json
@@ -13,7 +13,9 @@ cat << EOF > /etc/vault/tokens.json
13
13
  }
14
14
  EOF
15
15
 
16
- mkdir -p /opt/as-vault-tool/<%= ENV['AS_VAULT_TOOL_VERSION'] %>
16
+ if [ ! -d /opt/as-vault-tool/<%= ENV['AS_VAULT_TOOL_VERSION'] %> ]; then
17
+ mkdir -p /opt/as-vault-tool/<%= ENV['AS_VAULT_TOOL_VERSION'] %>
18
+ fi
17
19
  wget https://storage.googleapis.com/ads-devops-chef/as-vault-tool/<%= ENV['AS_VAULT_TOOL_VERSION'] %>/linux_amd64.zip
18
20
  unzip linux_amd64 -d /opt/as-vault-tool/<%= ENV['AS_VAULT_TOOL_VERSION'] %>/
19
21
  /opt/as-vault-tool/<%= ENV['AS_VAULT_TOOL_VERSION'] %>/as-vault-tool tokenrenew
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sambot
4
- VERSION = '0.1.139'.freeze
4
+ VERSION = '0.1.140'.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.139
4
+ version: 0.1.140
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Kouame