master_manipulator 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YTc3OGRjYjUyYTQ1MDNjYmE3NzM3NTFmMzc0YTMwMDFiY2JlY2EyOA==
4
+ OGI5NWY1NDIzOTg4YmU4ZTg5ODNiZTM2YTAxOThiODZmYmM3ZGQ2ZA==
5
5
  data.tar.gz: !binary |-
6
- Y2U4NTA0MWRiODk3ODk0N2I0ODdlZmUyMjg1YjhhZTBiM2U2MzhkMg==
6
+ Nzg2ZGRlMWQxMjQ1OTdmMDI5YzJiNjMzNmNmZjI1OGYzMDlkNTVhZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzdhNTBmNTVhZDRlZmI3MjZjNTg4ZWYwMGFjMDBkYWJkNDM4YzE1NTY2N2Jl
10
- ODE4OTIyNjg4ZWExYTIwYTUyZTg2MGI2MTNjMmEwNmQ1ZGE3ZDlhY2VkYTNj
11
- ODczZGM3YTA3NmFiNmViZmVkNTE2MDhjNDAyY2JhN2E4MjQyZDc=
9
+ NGYxZDYzZjRhMGU2MmIxZWRiODRhYzhjYTlkMWY0NTc3ZjljNGI3Yjc5YzE4
10
+ NDc5MWQzNzFlMTI1MTY5NzIzMTRlMWViOTk4ZmZhYmE5YjVlMjE3N2JhZjE0
11
+ MTk3N2U5ZTcyZmNjYWQxOTYyMGQxYzc4MDBkM2UzMDMwOGNjMWI=
12
12
  data.tar.gz: !binary |-
13
- Y2M1Njg0NGE2MDM5ZDg2NjI1YTJmNGFiY2UzY2M0ZTNhZjUyOWRlOGMyZDll
14
- MzU0M2RkMDI3M2ZmYmViNjBhODk4MjRkMWU2ZjEyZjEyNGI2ZjFhMTYyOTVk
15
- ZjJlMDk5ZTRkZjJmYWFiNTVjMmI2ODVkNzliOGM3ODFiYzU0NTI=
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
- log_dir = on(master_host, "puppet config print logdir").stdout.chomp
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)
@@ -1,5 +1,5 @@
1
1
  module MasterManipulator
2
2
  module Version
3
- STRING = '2.0.0'
3
+ STRING = '2.1.0'
4
4
  end
5
5
  end
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.0.0
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-03-15 00:00:00.000000000 Z
11
+ date: 2017-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler