ops_team 1.3.2 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/app_config.rb +1 -1
- data/lib/dependencies/sshkey.rb +12 -1
- data/lib/secrets.rb +1 -1
- data/ops_team.gemspec +3 -3
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bf95d0b212fcf2fc2b6f6beb2d9acf60002725f6b0e51a85ae7b49cb337772c
|
4
|
+
data.tar.gz: 9ad06b3344df5c710420d31580ce7b316b9e22d172143397081d37c9e6b0b55f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69e8a3408d8111ac85c032ae51d9d8bd83c4b2d4455b459f11e4a202868335652c1b93df6bf56de97c98bf8cd3fa34a4855b2a6b0917ed95d0cb345c4c20923f
|
7
|
+
data.tar.gz: 47a7174fffd8a391359a8ff3253be91d3b1a03ea7607cfc628e3cce0cb36f17e227928592f35d6ab344494d0cb4687747cc67a8e8205d40cda839056aa0b518f
|
data/lib/app_config.rb
CHANGED
@@ -42,7 +42,7 @@ class AppConfig
|
|
42
42
|
def config
|
43
43
|
@config ||= file_contents ? YAML.safe_load(file_contents) : {}
|
44
44
|
rescue YAML::SyntaxError => e
|
45
|
-
raise ParsingError, "
|
45
|
+
raise ParsingError, "#{@filename}: #{e}"
|
46
46
|
end
|
47
47
|
|
48
48
|
def file_contents
|
data/lib/dependencies/sshkey.rb
CHANGED
@@ -9,6 +9,7 @@ module Dependencies
|
|
9
9
|
DEFAULT_KEY_SIZE = 2048
|
10
10
|
DEFAULT_KEY_ALGO = "rsa"
|
11
11
|
DEFAULT_KEY_LIFETIME_S = 3600
|
12
|
+
DEFAULT_KEY_FILE_COMMENT_COMMAND = "$USER@`hostname -s`"
|
12
13
|
|
13
14
|
def met?
|
14
15
|
# we always need to at least update the key lifetime in the agent
|
@@ -36,7 +37,9 @@ module Dependencies
|
|
36
37
|
private
|
37
38
|
|
38
39
|
def generate_key
|
39
|
-
execute(
|
40
|
+
execute(
|
41
|
+
"ssh-keygen -b #{opt_key_size} -t #{opt_key_algo} -f #{priv_key_name} -q -N '#{passphrase}' -C '#{key_file_comment}'"
|
42
|
+
)
|
40
43
|
end
|
41
44
|
|
42
45
|
def add_key
|
@@ -59,6 +62,10 @@ module Dependencies
|
|
59
62
|
Ops.project_name
|
60
63
|
end
|
61
64
|
|
65
|
+
def key_file_comment
|
66
|
+
`echo #{opt_key_file_comment_command}`.chomp
|
67
|
+
end
|
68
|
+
|
62
69
|
def dir_name
|
63
70
|
`echo #{File.dirname(name)}`.chomp
|
64
71
|
end
|
@@ -107,5 +114,9 @@ module Dependencies
|
|
107
114
|
def opt_key_lifetime
|
108
115
|
Options.get("sshkey.key_lifetime") || DEFAULT_KEY_LIFETIME_S
|
109
116
|
end
|
117
|
+
|
118
|
+
def opt_key_file_comment_command
|
119
|
+
Options.get("sshkey.key_file_comment") || DEFAULT_KEY_FILE_COMMENT_COMMAND
|
120
|
+
end
|
110
121
|
end
|
111
122
|
end
|
data/lib/secrets.rb
CHANGED
@@ -53,7 +53,7 @@ class Secrets < AppConfig
|
|
53
53
|
out, err, _status = Open3.capture3("ejson decrypt #{@filename}")
|
54
54
|
|
55
55
|
# TODO: err is only nil in testing, but I can't figure out why the stubbing isn't working
|
56
|
-
raise ParsingError, "
|
56
|
+
raise ParsingError, "#{@filename}: #{err}" unless err.nil? || err.empty?
|
57
57
|
|
58
58
|
out
|
59
59
|
end
|
data/ops_team.gemspec
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'ops_team'
|
5
|
-
s.version = '1.
|
5
|
+
s.version = '1.4.2'
|
6
6
|
s.authors = [
|
7
7
|
'nickthecook@gmail.com'
|
8
8
|
]
|
9
|
-
s.date = '
|
10
|
-
s.summary = 'ops_team handles basic operations tasks for your project, driven by YAML config'
|
9
|
+
s.date = '2021-05-05'
|
10
|
+
s.summary = 'ops_team handles basic operations tasks for your project, driven by self-documenting YAML config'
|
11
11
|
s.homepage = 'https://github.com/nickthecook/ops'
|
12
12
|
s.files = Dir[
|
13
13
|
'Gemfile',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ops_team
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nickthecook@gmail.com
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt_pbkdf
|
@@ -150,8 +150,8 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 1.1.6
|
153
|
-
description:
|
154
|
-
email:
|
153
|
+
description:
|
154
|
+
email:
|
155
155
|
executables:
|
156
156
|
- ops
|
157
157
|
extensions: []
|
@@ -211,7 +211,7 @@ homepage: https://github.com/nickthecook/ops
|
|
211
211
|
licenses:
|
212
212
|
- GPL-3.0-only
|
213
213
|
metadata: {}
|
214
|
-
post_install_message:
|
214
|
+
post_install_message:
|
215
215
|
rdoc_options: []
|
216
216
|
require_paths:
|
217
217
|
- lib
|
@@ -227,8 +227,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
227
227
|
version: '0'
|
228
228
|
requirements: []
|
229
229
|
rubygems_version: 3.1.2
|
230
|
-
signing_key:
|
230
|
+
signing_key:
|
231
231
|
specification_version: 4
|
232
|
-
summary: ops_team handles basic operations tasks for your project, driven by
|
233
|
-
config
|
232
|
+
summary: ops_team handles basic operations tasks for your project, driven by self-documenting
|
233
|
+
YAML config
|
234
234
|
test_files: []
|