opswalrus 1.0.9 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +7 -1
- data/lib/opswalrus/app.rb +5 -0
- data/lib/opswalrus/cli.rb +8 -1
- data/lib/opswalrus/host.rb +1 -1
- data/lib/opswalrus/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9504aa3c2b2bb9cb90f0623261750dcf956be5d1ea227b82851260d0fdd425ca
|
4
|
+
data.tar.gz: cc36a65d93bb507cdf5b6041d5c3228f2a3f84acb78bcc8489d9fb925e86b13a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0ff218c83c59ecb04149ec050ab607421aa7f73f566adf079ac55d71748e853d8c8d5606b088bf1a52419cd50fe54da3053eb9ad31bd86131f3afa163a6bbc8
|
7
|
+
data.tar.gz: 64d394b48755699addc20e1528a8806c6e38c4baf7e406ecf39d760a18b04c4a13d6554d0e5955c734c15e04fb18b5ea5e7d51bd29df66674f789e31b8203d28
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -10,12 +10,18 @@ You have two options:
|
|
10
10
|
|
11
11
|
## Rubygems install
|
12
12
|
|
13
|
+
```shell
|
14
|
+
gem install opswalrus
|
15
|
+
|
16
|
+
ops version
|
17
|
+
```
|
18
|
+
|
13
19
|
## Docker install
|
14
20
|
|
15
21
|
```shell
|
16
22
|
alias ops='docker run --rm -it -v $HOME/.ssh:/root/.ssh -v /var/run/docker.sock:/var/run/docker.sock -v ${PWD}/:/workdir ghcr.io/opswalrus/ops'
|
17
23
|
|
18
|
-
ops
|
24
|
+
ops version
|
19
25
|
```
|
20
26
|
|
21
27
|
# Examples
|
data/lib/opswalrus/app.rb
CHANGED
@@ -14,6 +14,7 @@ require_relative "hosts_file"
|
|
14
14
|
require_relative "operation_runner"
|
15
15
|
require_relative "bundler"
|
16
16
|
require_relative "package_file"
|
17
|
+
require_relative "version"
|
17
18
|
|
18
19
|
|
19
20
|
module OpsWalrus
|
@@ -336,6 +337,10 @@ module OpsWalrus
|
|
336
337
|
selected_hosts.sort_by(&:to_s)
|
337
338
|
end
|
338
339
|
|
340
|
+
def print_version
|
341
|
+
puts VERSION
|
342
|
+
end
|
343
|
+
|
339
344
|
def unzip(zip_bundle_file = nil, output_dir = nil)
|
340
345
|
bundler.unzip(zip_bundle_file, output_dir)
|
341
346
|
end
|
data/lib/opswalrus/cli.rb
CHANGED
@@ -28,12 +28,19 @@ module OpsWalrus
|
|
28
28
|
desc 'Be verbose'
|
29
29
|
switch [:v, :verbose]
|
30
30
|
|
31
|
-
desc '
|
31
|
+
desc 'Turn on debug mode'
|
32
32
|
switch [:d, :debug]
|
33
33
|
|
34
34
|
flag [:h, :hosts], multiple: true, desc: "Specify the hosts.yaml file"
|
35
35
|
flag [:t, :tags], multiple: true, desc: "Specify a set of tags to filter the hosts by"
|
36
36
|
|
37
|
+
desc 'Print version'
|
38
|
+
command :version do |c|
|
39
|
+
c.action do |global_options, options, args|
|
40
|
+
$app.print_version
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
37
44
|
desc 'Report on the host inventory'
|
38
45
|
long_desc 'Report on the host inventory'
|
39
46
|
command :inventory do |c|
|
data/lib/opswalrus/host.rb
CHANGED
@@ -22,7 +22,7 @@ module OpsWalrus
|
|
22
22
|
# so we want to build up a command and send it to the remote host via HostDSL#run_ops
|
23
23
|
@method_chain.unshift(Bundler::BUNDLE_DIR) if @is_invocation_a_call_to_package_in_bundle_dir
|
24
24
|
|
25
|
-
remote_run_command_args = "--
|
25
|
+
remote_run_command_args = "--script"
|
26
26
|
|
27
27
|
remote_run_command_args << " "
|
28
28
|
remote_run_command_args << @method_chain.join(" ")
|
data/lib/opswalrus/version.rb
CHANGED