You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](#transfer-notice)
5
+
5
6
This module contains a set of tasks and custom facts to allow the automation of and reporting on operating system patching. Currently, patching works on Linux (Redhat, Suse and Debian derivatives) and Windows (Server 2008 through to 2019 have been tested). FreeBSD support is a work in progress and is currently reporting only.
6
7
7
8
Under the hood, it uses the OS level tools or APIs to carry out the actual patching. That does mean that you need to be sure that your nodes can search for their updates using the native tool - e.g. You still need to manage the configuration of YUM, APT, Zypper or Windows Update.
@@ -10,7 +11,7 @@ Under the hood, it uses the OS level tools or APIs to carry out the actual patch
10
11
11
12
**Note** - FreeBSD support is currently limited to reporting patch state only. Actual patching will be enabled in a future release.
12
13
13
-
[The wiki](https://github.com/albatrossflavour/puppet_os_patching/wiki/Background) contains some useful background information on the module and how it works.
14
+
[The wiki](https://github.com/voxpupuli/puppet-os_patching/wiki/Background) contains some useful background information on the module and how it works.
14
15
15
16
## Description
16
17
@@ -35,28 +36,33 @@ Install the module using the Puppetfile, include it on your nodes and then use t
35
36
## Usage
36
37
37
38
### Manifest
39
+
38
40
Include the module:
41
+
39
42
```puppet
40
43
include os_patching
41
44
```
42
45
43
46
More advanced usage:
47
+
44
48
```puppet
45
49
class { 'os_patching':
46
50
patch_window => 'Week3',
47
-
blackout_windows => { 'End of year change freeze':
48
-
{
49
-
'start': '2018-12-15T00:00:00+1000',
50
-
'end': '2019-01-15T23:59:59+1000',
51
-
}
51
+
blackout_windows => {
52
+
'End of year change freeze' => {
53
+
'start' => '2018-12-15T00:00:00+10:00',
54
+
'end' => '2019-01-15T23:59:59+10:00',
55
+
},
52
56
},
53
57
}
54
58
```
55
59
56
60
In that example, the node is assigned to a "patch window", will be forced to reboot regardless of the setting specified in the task and has a blackout window defined for the period of 2018-12-15 - 2019-01-15, during which time no patching through the task can be carried out.
57
61
58
62
### Task
63
+
59
64
Run a basic patching task from the command line:
65
+
60
66
```bash
61
67
os_patching::patch_server - Carry out OS patching on the server, optionally including a reboot and/or only applying security-related updates
62
68
@@ -77,6 +83,7 @@ PARAMETERS:
77
83
```
78
84
79
85
Example:
86
+
80
87
```bash
81
88
$ puppet task run os_patching::patch_server --params='{"reboot": "patched", "security_only": false}' --query="inventory[certname] { facts.os_patching.patch_window = 'Week3' and facts.os_patching.blocked = false and facts.os_patching.package_update_count > 0}"
82
89
```
@@ -266,6 +273,7 @@ If patching was blocked, the task will report similar to below:
266
273
Error: Task exited: 100
267
274
Patching blocked
268
275
```
276
+
269
277
A summary of the patch run is also written to `/var/cache/os_patching/run_history`, the last line of which is used by the `os_patching.last_run` fact.
270
278
271
279
```bash
@@ -362,3 +370,9 @@ Fork, develop, submit a pull request
0 commit comments