Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
dd49505
Fix to ensure facts are generated on first run
albatrossflavour Mar 26, 2019
2dce104
Move from PDQ to PDK and litmus testing
albatrossflavour Apr 18, 2019
1b0e3fa
Move from PDQ to PDK and litmus testing
albatrossflavour Apr 18, 2019
a7f46f1
travis updates
albatrossflavour Apr 18, 2019
9c67b74
switch to http
albatrossflavour Apr 18, 2019
31a6664
added input_method parameter for zypper to support sles patching
JakeTRogers Sep 13, 2018
d8ace52
added SLES 11, 12, & 15 as supported operating systems
JakeTRogers Sep 13, 2018
4a7a8e1
added sles support to os_patching_fact_generation.sh and added yum fi…
JakeTRogers Feb 26, 2019
1a88673
added sles support to clean_cache task
JakeTRogers Feb 26, 2019
231bbec
added sles support to patch_server task
JakeTRogers Feb 26, 2019
d10e917
update
albatrossflavour Apr 18, 2019
eba669f
arrgh
albatrossflavour Apr 18, 2019
b7314f4
travis
albatrossflavour Apr 18, 2019
1ae3477
update
albatrossflavour Apr 18, 2019
4f3dc1c
new bundle
albatrossflavour Apr 18, 2019
2188520
update
albatrossflavour Apr 18, 2019
5113cd5
ahh, thats where the problem was
albatrossflavour Apr 18, 2019
953bef8
ahh, thats where the problem was
albatrossflavour Apr 18, 2019
e015e8d
newline
albatrossflavour Apr 18, 2019
87d7fd4
branch
albatrossflavour Apr 18, 2019
7d2dc14
travis fixen
albatrossflavour Apr 18, 2019
6b545d4
fix spec
albatrossflavour Apr 18, 2019
55b53fa
fix spec
albatrossflavour Apr 18, 2019
fbee249
final updates
albatrossflavour Apr 18, 2019
344de33
Fixed makefile
albatrossflavour Apr 19, 2019
d47d6ca
windows update
albatrossflavour Apr 21, 2019
4397707
typo
albatrossflavour Apr 21, 2019
24a2b2b
test
albatrossflavour Apr 21, 2019
4ae7409
test
albatrossflavour Apr 21, 2019
43e43d6
test
albatrossflavour Apr 21, 2019
0379481
Update
albatrossflavour Apr 21, 2019
7efc420
test
albatrossflavour Apr 21, 2019
8d4b34d
test
albatrossflavour Apr 21, 2019
471b828
fix
albatrossflavour Apr 21, 2019
961e1f0
test
albatrossflavour Apr 21, 2019
78b8296
user
albatrossflavour Apr 22, 2019
00c60a4
perms
albatrossflavour Apr 22, 2019
4e96c7b
powershell
albatrossflavour Apr 22, 2019
0dbb93c
powershell
albatrossflavour Apr 22, 2019
76b4cd8
choco
albatrossflavour Apr 22, 2019
31fb2c8
Fixed makefile
albatrossflavour Apr 22, 2019
59f3454
update
albatrossflavour Apr 22, 2019
ace86cd
update
albatrossflavour Apr 22, 2019
79461dd
Merge pull request #113 from JakeTRogers/feature/sles
albatrossflavour Apr 24, 2019
ade23bb
Move from PDQ to PDK and litmus testing
albatrossflavour Apr 18, 2019
044ee29
Move from PDQ to PDK and litmus testing
albatrossflavour Apr 18, 2019
8a443c8
travis updates
albatrossflavour Apr 18, 2019
9ddb7c5
switch to http
albatrossflavour Apr 18, 2019
d4452f3
update
albatrossflavour Apr 18, 2019
0e30d74
arrgh
albatrossflavour Apr 18, 2019
711a824
travis
albatrossflavour Apr 18, 2019
e953e86
update
albatrossflavour Apr 18, 2019
2f28ab5
new bundle
albatrossflavour Apr 18, 2019
b011ff9
update
albatrossflavour Apr 18, 2019
2d1eaba
ahh, thats where the problem was
albatrossflavour Apr 18, 2019
1299f62
ahh, thats where the problem was
albatrossflavour Apr 18, 2019
7e0e9e3
newline
albatrossflavour Apr 18, 2019
0b6ef43
branch
albatrossflavour Apr 18, 2019
f0a5aeb
travis fixen
albatrossflavour Apr 18, 2019
9866075
fix spec
albatrossflavour Apr 18, 2019
0acbed7
fix spec
albatrossflavour Apr 18, 2019
bf6ebf0
final updates
albatrossflavour Apr 18, 2019
5ba3161
Fixed makefile
albatrossflavour Apr 19, 2019
2be7d20
windows update
albatrossflavour Apr 21, 2019
0799962
typo
albatrossflavour Apr 21, 2019
e7bbbdd
test
albatrossflavour Apr 21, 2019
6381231
test
albatrossflavour Apr 21, 2019
fbccb25
test
albatrossflavour Apr 21, 2019
bee126d
Update
albatrossflavour Apr 21, 2019
ba21725
test
albatrossflavour Apr 21, 2019
08aa634
test
albatrossflavour Apr 21, 2019
c53c028
fix
albatrossflavour Apr 21, 2019
d75eccf
test
albatrossflavour Apr 21, 2019
a4fccc8
user
albatrossflavour Apr 22, 2019
af1503b
perms
albatrossflavour Apr 22, 2019
89a5d9e
powershell
albatrossflavour Apr 22, 2019
6b63c5e
powershell
albatrossflavour Apr 22, 2019
110fd92
choco
albatrossflavour Apr 22, 2019
ba6bbb3
Fixed makefile
albatrossflavour Apr 22, 2019
7888709
update
albatrossflavour Apr 22, 2019
f611c36
update
albatrossflavour Apr 22, 2019
eae4fbe
Merge branch 'litmus' of github.com:albatrossflavour/puppet_os_patchi…
albatrossflavour Apr 24, 2019
25ef36e
Forgot to remove the check
albatrossflavour Apr 24, 2019
ae1b71e
[blacksmith] Bump version to 0.9.0
albatrossflavour Apr 24, 2019
7e5183e
Updated changelog
albatrossflavour Apr 24, 2019
a63eba4
Revert changes
albatrossflavour Apr 24, 2019
12c3f73
Fixed translate
albatrossflavour Apr 25, 2019
1b765b2
Updated readme
albatrossflavour Apr 26, 2019
b509b0c
Merge pull request #114 from albatrossflavour/litmus
albatrossflavour Apr 26, 2019
08948db
Merge Litmus and Suse to production (#115) (#116)
albatrossflavour Apr 26, 2019
ba83197
Add plans and a readme
albatrossflavour Apr 26, 2019
2f93307
Updated example
albatrossflavour Apr 26, 2019
11207e3
#117 updated readme
albatrossflavour Apr 26, 2019
8f31c6c
Merge pull request #118 from albatrossflavour/feature/plans
albatrossflavour Apr 26, 2019
f2992ae
V0.10.0 updates
albatrossflavour Apr 26, 2019
21f5d56
updated changelog
albatrossflavour Apr 26, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
# Change Log

## [0.9.0](https://github.com/albatrossflavour/puppet_os_patching/tree/0.9.0) (2019-04-24)
[Full Changelog](https://github.com/albatrossflavour/puppet_os_patching/compare/0.8.0...0.9.0)
## [0.10.0](https://github.com/albatrossflavour/puppet_os_patching/tree/0.10.0) (2019-04-26)
[Full Changelog](https://github.com/albatrossflavour/puppet_os_patching/compare/0.9.0...0.10.0)

**Implemented enhancements:**

- os_patching can now patch Suse Linux (Thanks [JakeTRogers](https://github.com/JakeTRogers))
- Switched acceptance testing over to [Litmus](https://github.com/puppetlabs/puppet_litmus/wiki/Overview-of-Litmus)
- Create example bolt plan for patching [\#117](https://github.com/albatrossflavour/puppet_os_patching/issues/117)

**Merged pull requests:**

- Add example plan [\#118](https://github.com/albatrossflavour/puppet_os_patching/pull/118) ([albatrossflavour](https://github.com/albatrossflavour))
- Resync development [\#116](https://github.com/albatrossflavour/puppet_os_patching/pull/116) ([albatrossflavour](https://github.com/albatrossflavour))

## [0.9.0](https://github.com/albatrossflavour/puppet_os_patching/tree/0.9.0) (2019-04-26)
[Full Changelog](https://github.com/albatrossflavour/puppet_os_patching/compare/0.8.0...0.9.0)

**Merged pull requests:**

- Merge Litmus and Suse to production [\#115](https://github.com/albatrossflavour/puppet_os_patching/pull/115) ([albatrossflavour](https://github.com/albatrossflavour))
- Switch over to litmus tests [\#114](https://github.com/albatrossflavour/puppet_os_patching/pull/114) ([albatrossflavour](https://github.com/albatrossflavour))
- Feature/sles [\#113](https://github.com/albatrossflavour/puppet_os_patching/pull/113) ([JakeTRogers](https://github.com/JakeTRogers))

## [0.8.0](https://github.com/albatrossflavour/puppet_os_patching/tree/0.8.0) (2019-01-24)
Expand Down
34 changes: 34 additions & 0 deletions examples/patch_using_plans.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Patching with plans

You can use bolt plans to add conditional logic into patching. An example plan can be found in the `plans` directory of the module.

`bolt plan run --modulepath=~/.puppetlabs/bolt/modules os_patching::patch_after_healthcheck -n ssh://centos7.example.com --no-host-key-check --run-as root`


```
Starting: plan os_patching::patch_after_healthcheck
Starting: task puppet_health_check::agent_health on ssh://centos7.example.com, ssh://puppetmaster.example.com
Finished: task puppet_health_check::agent_health with 0 failures in 2.78 sec
Skipping the following nodes due to health check failures : [{"node":"ssh://puppetmaster.example.com","type":"task","object":"puppet_health_check::agent_health","status":"success","result":{"issues":{"noop":"noop set to true should be false"},"state":"issues found","certname":"puppetmaster.example.com","date":"2019-04-26T14:28:28+10:00","noop_run":false}}]
Starting: task os_patching::patch_server on centos7.example.com
Finished: task os_patching::patch_server with 0 failures in 12.33 sec
Finished: plan os_patching::patch_after_healthcheck in 15.14 sec
Finished on centos7.example.com:
{
"return": "Success",
"reboot": "never",
"security": false,
"message": "No patches to apply",
"packages_updated": "",
"debug": "",
"job_id": "",
"pinned_packages": [

],
"start_time": "2019-04-26T14:28:29+10:00",
"end_time": "2019-04-26T14:28:41+10:00"
}
Successful on 1 node: centos7.example.com
Ran on 1 node
```

2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "albatrossflavour-os_patching",
"version": "0.9.0",
"version": "0.10.0",
"author": "Tony Green",
"summary": "Perform OS level patching through tasks and report on patch levels through facts",
"license": "Apache-2.0",
Expand Down
21 changes: 21 additions & 0 deletions plans/patch_after_healthcheck.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
plan os_patching::patch_after_healthcheck (TargetSpec $nodes) {
# Run an initial health check to make sure the target nodes are ready

$health_checks = run_task('puppet_health_check::agent_health',
$nodes,
target_noop_state => false,
target_service_enabled => true,
target_service_running => true,
target_runinterval => 1800,
'_catch_errors' => true,
)

$nodes_to_patch = $health_checks.filter | $items | { $items.value['state'] == 'clean' }
$nodes_skipped = $health_checks.filter | $items | { $items.value['state'] != 'clean' }

$skipped_targets = $nodes_skipped.map | $value | { $value['certname'] }
$targets = $nodes_to_patch.map | $value | { $value['certname'] }

notice ("Skipping the following nodes due to health check failures : ${nodes_skipped}")
return run_task('os_patching::patch_server', $targets)
}