master_manipulator 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/master_manipulator/log.rb +11 -3
- data/lib/master_manipulator/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OGI5NWY1NDIzOTg4YmU4ZTg5ODNiZTM2YTAxOThiODZmYmM3ZGQ2ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Nzg2ZGRlMWQxMjQ1OTdmMDI5YzJiNjMzNmNmZjI1OGYzMDlkNTVhZg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NGYxZDYzZjRhMGU2MmIxZWRiODRhYzhjYTlkMWY0NTc3ZjljNGI3Yjc5YzE4
|
10
|
+
NDc5MWQzNzFlMTI1MTY5NzIzMTRlMWViOTk4ZmZhYmE5YjVlMjE3N2JhZjE0
|
11
|
+
MTk3N2U5ZTcyZmNjYWQxOTYyMGQxYzc4MDBkM2UzMDMwOGNjMWI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTA1YmMwNjVmMjVjZGQzYzc3NGUwMjAxZTU3NGFmZjY4ZjVmNmRhMWQ5ZGZm
|
14
|
+
Yzc4NzRlOGYyYzhlMDFmZWUwMDVkYzkyZWJjNzE1Y2FiNjJlN2EyYjdkZjA4
|
15
|
+
NjYwZjZlMDBkN2IxMWIwYWI5YWRiZGFkZTU2NmQ3YmRjOTc4NmU=
|
@@ -2,6 +2,16 @@
|
|
2
2
|
module MasterManipulator
|
3
3
|
module Log
|
4
4
|
|
5
|
+
# Return the path to the puppetserver log file
|
6
|
+
# @param [Beaker::Host] master_host The puppet server host
|
7
|
+
# @return [String] path to puppetserver log file
|
8
|
+
# @example return the path to the puppet server log file
|
9
|
+
# puppet_server_log_path(master)
|
10
|
+
def puppet_server_log_path(master_host)
|
11
|
+
log_dir = on(master_host, puppet("master --configprint logdir")).stdout.chomp
|
12
|
+
"#{log_dir}/puppetserver.log"
|
13
|
+
end
|
14
|
+
|
5
15
|
#<fileNamePattern>/var/log/puppetlabs/puppetserver/puppetserver-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
6
16
|
|
7
17
|
# Rollover the puppetserver log file the same way logback would
|
@@ -11,9 +21,7 @@ module MasterManipulator
|
|
11
21
|
# rotate_puppet_server_log(master)
|
12
22
|
def rotate_puppet_server_log(master_host)
|
13
23
|
|
14
|
-
|
15
|
-
#this is ugly, rev 2 should parse the logback.xml, doesn't seem to be another way
|
16
|
-
log_file = log_dir + "server/puppetserver.log"
|
24
|
+
log_file = puppet_server_log_path(master_host)
|
17
25
|
|
18
26
|
date_str = on(master_host, "date +%Y-%m-%d").stdout.chomp
|
19
27
|
backup_log_file = log_file.sub(/\log$/,date_str)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: master_manipulator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|