hammer_cli_foreman_admin 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/config/cli.modules.d/foreman_admin_logging_core.yml +3 -0
- data/config/cli.modules.d/foreman_admin_logging_katello.yml +6 -0
- data/lib/hammer_cli_foreman_admin/logging_command.rb +2 -2
- data/lib/hammer_cli_foreman_admin/version.rb +1 -1
- metadata +14 -15
- data/locale/en/hammer-cli-foreman-admin.edit.po +0 -74
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57031fc9298521918fbdc043207f91756dd2bcfe
|
4
|
+
data.tar.gz: de1804d20a78348cedfb19a06a21e64a2015fa89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdc764d68b67a1f0dafcdba509bd36d803693b4e5c30dbdea17f880a38a6bb34e418eb2899085b9e57409cc252142c379d103b01f1bd072522819b6aae8afb59
|
7
|
+
data.tar.gz: fd2cb8187b955543dd217912aaf1b90f169b44440755a1eb4ad4bfc20f86061618785d9f2ebe51caca4882858723d642a219efd89b096ea3d2143b0c63e2b04a
|
data/README.md
CHANGED
@@ -52,3 +52,10 @@ Currently recognized components (files):
|
|
52
52
|
|
53
53
|
The tool uses search and replace approach declared in YAML configuration files
|
54
54
|
`foreman_admin_logging_core.yml` and `foreman_admin_logging_katello.yml`.
|
55
|
+
|
56
|
+
### Development
|
57
|
+
|
58
|
+
To test the logging subcommand, use the fixture examples and compare with git
|
59
|
+
diff:
|
60
|
+
|
61
|
+
hammer -d admin logging --prefix test/fixture_tree/ --no-backup -a -d
|
@@ -55,10 +55,12 @@
|
|
55
55
|
-
|
56
56
|
:action: ensure_line_is_present
|
57
57
|
:line: [":log_level", ": ", "DEBUG"]
|
58
|
+
:join_with: ''
|
58
59
|
:production:
|
59
60
|
-
|
60
61
|
:action: ensure_line_is_present
|
61
62
|
:line: [":log_level", ": ", "ERROR"]
|
63
|
+
:join_with: ''
|
62
64
|
-
|
63
65
|
:name: puppet
|
64
66
|
:friendly_name: Foreman Proxy
|
@@ -87,6 +89,7 @@
|
|
87
89
|
-
|
88
90
|
:action: ensure_line_is_present
|
89
91
|
:line: ["log-facility", " ", "local6;"]
|
92
|
+
:join_with: ''
|
90
93
|
:production:
|
91
94
|
-
|
92
95
|
:action: remove_file
|
@@ -15,10 +15,12 @@
|
|
15
15
|
-
|
16
16
|
:action: ensure_line_is_present
|
17
17
|
:line: ["log-enable", "=", "info+"]
|
18
|
+
:join_with: ''
|
18
19
|
:production:
|
19
20
|
-
|
20
21
|
:action: ensure_line_is_present
|
21
22
|
:line: ["log-enable", "=", "error+"]
|
23
|
+
:join_with: ''
|
22
24
|
-
|
23
25
|
:name: tomcat
|
24
26
|
:friendly_name: Candlepin
|
@@ -47,6 +49,7 @@
|
|
47
49
|
-
|
48
50
|
:action: ensure_line_is_present
|
49
51
|
:line: ["log_level", ": ", "DEBUG"]
|
52
|
+
:join_with: ''
|
50
53
|
:production:
|
51
54
|
-
|
52
55
|
:action: remove_file
|
@@ -54,6 +57,7 @@
|
|
54
57
|
-
|
55
58
|
:action: ensure_line_is_present
|
56
59
|
:line: ["log_level", ": ", "INFO"]
|
60
|
+
:join_with: ''
|
57
61
|
-
|
58
62
|
:name: virt-who
|
59
63
|
:friendly_name: Virt-who utility
|
@@ -63,7 +67,9 @@
|
|
63
67
|
-
|
64
68
|
:action: ensure_line_is_present
|
65
69
|
:line: ["VIRTWHO_DEBUG", "=", "1"]
|
70
|
+
:join_with: ''
|
66
71
|
:production:
|
67
72
|
-
|
68
73
|
:action: ensure_line_is_present
|
69
74
|
:line: ["VIRTWHO_DEBUG", "=", "0"]
|
75
|
+
:join_with: ''
|
@@ -63,8 +63,8 @@ module HammerCLIForemanAdmin
|
|
63
63
|
else
|
64
64
|
left = opts[:line][0]
|
65
65
|
mid = opts[:line][1]
|
66
|
-
|
67
|
-
content = File.read(opts[:file]).gsub(
|
66
|
+
join_with = opts[:join_with] || ' '
|
67
|
+
content = File.read(opts[:file]).gsub(/#* ?#{left}\s*#{mid}\s*.*$/, opts[:line].join(join_with))
|
68
68
|
open(opts[:file], "w") { |file| file << content }
|
69
69
|
end
|
70
70
|
end
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hammer_cli_foreman_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas Zapletal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hammer_cli
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
description: Foreman administrative commands plugin for Hammer CLI
|
@@ -32,19 +32,18 @@ extra_rdoc_files:
|
|
32
32
|
- LICENSE
|
33
33
|
- README.md
|
34
34
|
files:
|
35
|
-
- LICENSE
|
36
|
-
- README.md
|
37
|
-
- config/cli.modules.d/foreman_admin_logging_core.yml
|
38
|
-
- config/cli.modules.d/foreman_admin_logging_katello.yml
|
39
35
|
- config/foreman_admin.yml
|
40
|
-
-
|
36
|
+
- config/cli.modules.d/foreman_admin_logging_katello.yml
|
37
|
+
- config/cli.modules.d/foreman_admin_logging_core.yml
|
38
|
+
- lib/hammer_cli_foreman_admin/version.rb
|
39
|
+
- lib/hammer_cli_foreman_admin/logging_command.rb
|
41
40
|
- lib/hammer_cli_foreman_admin/admin_command.rb
|
42
41
|
- lib/hammer_cli_foreman_admin/i18n.rb
|
43
|
-
- lib/hammer_cli_foreman_admin
|
44
|
-
- lib/hammer_cli_foreman_admin/version.rb
|
45
|
-
- locale/en/hammer-cli-foreman-admin.edit.po
|
42
|
+
- lib/hammer_cli_foreman_admin.rb
|
46
43
|
- locale/en/hammer-cli-foreman-admin.po
|
47
44
|
- locale/hammer-cli-foreman-admin.pot
|
45
|
+
- LICENSE
|
46
|
+
- README.md
|
48
47
|
homepage: https://github.com/theforeman/hammer-cli-foreman-admin
|
49
48
|
licenses:
|
50
49
|
- GPL-3
|
@@ -55,17 +54,17 @@ require_paths:
|
|
55
54
|
- lib
|
56
55
|
required_ruby_version: !ruby/object:Gem::Requirement
|
57
56
|
requirements:
|
58
|
-
- -
|
57
|
+
- - '>='
|
59
58
|
- !ruby/object:Gem::Version
|
60
59
|
version: '0'
|
61
60
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
61
|
requirements:
|
63
|
-
- -
|
62
|
+
- - '>='
|
64
63
|
- !ruby/object:Gem::Version
|
65
64
|
version: '0'
|
66
65
|
requirements: []
|
67
66
|
rubyforge_project:
|
68
|
-
rubygems_version: 2.
|
67
|
+
rubygems_version: 2.0.14.1
|
69
68
|
signing_key:
|
70
69
|
specification_version: 4
|
71
70
|
summary: Foreman administrative commands plugin
|
@@ -1,74 +0,0 @@
|
|
1
|
-
# English translations for hammer-cli-foreman-admin package.
|
2
|
-
# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
|
3
|
-
# This file is distributed under the same license as the hammer-cli-foreman-admin package.
|
4
|
-
# FIRST AUTHOR <EMAIL@ADDRESS>, 2016.
|
5
|
-
#
|
6
|
-
msgid ""
|
7
|
-
msgstr ""
|
8
|
-
"Project-Id-Version: hammer-cli-foreman-admin 0.0.1\n"
|
9
|
-
"Report-Msgid-Bugs-To: \n"
|
10
|
-
"PO-Revision-Date: 2016-04-13 15:09+0200\n"
|
11
|
-
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
12
|
-
"Language-Team: English\n"
|
13
|
-
"Language: en\n"
|
14
|
-
"MIME-Version: 1.0\n"
|
15
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
16
|
-
"Content-Transfer-Encoding: 8bit\n"
|
17
|
-
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
18
|
-
"\n"
|
19
|
-
|
20
|
-
#: ../lib/hammer_cli_foreman_admin/admin_command.rb:6
|
21
|
-
msgid "Administrative server-side tasks"
|
22
|
-
msgstr ""
|
23
|
-
|
24
|
-
#: ../lib/hammer_cli_foreman_admin/logging_command.rb:6
|
25
|
-
msgid "Increase verbosity level to debug."
|
26
|
-
msgstr ""
|
27
|
-
|
28
|
-
#: ../lib/hammer_cli_foreman_admin/logging_command.rb:7
|
29
|
-
msgid "Decrease verbosity level to standard."
|
30
|
-
msgstr ""
|
31
|
-
|
32
|
-
#: ../lib/hammer_cli_foreman_admin/logging_command.rb:8
|
33
|
-
msgid "Components to apply, use --list to get them."
|
34
|
-
msgstr ""
|
35
|
-
|
36
|
-
#: ../lib/hammer_cli_foreman_admin/logging_command.rb:9
|
37
|
-
msgid "List available components."
|
38
|
-
msgstr ""
|
39
|
-
|
40
|
-
#: ../lib/hammer_cli_foreman_admin/logging_command.rb:10
|
41
|
-
msgid "Apply to all components."
|
42
|
-
msgstr ""
|
43
|
-
|
44
|
-
#: ../lib/hammer_cli_foreman_admin/logging_command.rb:11
|
45
|
-
msgid "Do not apply specified changes."
|
46
|
-
msgstr ""
|
47
|
-
|
48
|
-
#: ../lib/hammer_cli_foreman_admin/logging_command.rb:12
|
49
|
-
msgid "Skip configuration backups creation."
|
50
|
-
msgstr ""
|
51
|
-
|
52
|
-
#: ../lib/hammer_cli_foreman_admin/logging_command.rb:13
|
53
|
-
msgid "Operate on prefixed environment (e.g. chroot)."
|
54
|
-
msgstr ""
|
55
|
-
|
56
|
-
#: ../lib/hammer_cli_foreman_admin/logging_command.rb:30
|
57
|
-
msgid "Command '%{cmd}' failed: %{e}"
|
58
|
-
msgstr ""
|
59
|
-
|
60
|
-
#: ../lib/hammer_cli_foreman_admin/logging_command.rb:120
|
61
|
-
msgid "Component"
|
62
|
-
msgstr ""
|
63
|
-
|
64
|
-
#: ../lib/hammer_cli_foreman_admin/logging_command.rb:121
|
65
|
-
msgid "Auto-detected by existence of"
|
66
|
-
msgstr ""
|
67
|
-
|
68
|
-
#: ../lib/hammer_cli_foreman_admin/logging_command.rb:122
|
69
|
-
msgid "Destinations"
|
70
|
-
msgstr ""
|
71
|
-
|
72
|
-
#: ../lib/hammer_cli_foreman_admin/logging_command.rb:138
|
73
|
-
msgid "Logging verbosity level setup"
|
74
|
-
msgstr ""
|