Browse Source

Reload rsyslog/cron when we change timezones

If the default timezone in the overcloud image or deployed system is
changed on install, rsyslog will continue to use that timezone until
it's reloaded. Do a reload of rsyslog if we update the timezone file.
The same happens with crond so we need to reload that again.

Change-Id: I7cfde5963b4fce010e936b4fd5bbe96a39cc5c17
Closes-Bug: #1819548
(cherry picked from commit 2182e0b0d0)
changes/72/643072/1
Alex Schultz 2 months ago
parent
commit
ec02985da9
1 changed files with 13 additions and 0 deletions
  1. 13
    0
      puppet/services/time/timezone.yaml

+ 13
- 0
puppet/services/time/timezone.yaml View File

@@ -44,3 +44,16 @@ outputs:
44 44
         timezone::timezone: {get_param: TimeZone}
45 45
       step_config: |
46 46
         include ::timezone
47
+        exec { 'timezone-reload-rsyslog':
48
+            path        => ['/bin', '/usr/bin'],
49
+            command     => 'systemctl restart rsyslog',
50
+            refreshonly => true,
51
+            tag         => 'timezone-reload-services',
52
+        }
53
+        exec { 'timezone-reload-crond':
54
+            path        => ['/bin', '/usr/bin'],
55
+            command     => 'systemctl restart crond',
56
+            refreshonly => true,
57
+            tag         => 'timezone-reload-services',
58
+        }
59
+        File<| title == $::timezone::timezone_file |> ~> Exec<| tag == 'timezone-reload-services' |>

Loading…
Cancel
Save