Skip to content

Commit 6db6707

Browse files
committed
refactor(ruby): refactor patch_server.rb task, add timeout to apt get patching
1 parent fe0041a commit 6db6707

3 files changed

Lines changed: 323 additions & 345 deletions

File tree

REFERENCE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,25 +353,25 @@ Any additional parameters to include in the zypper update command
353353

354354
##### `reboot`
355355

356-
Data type: `Optional[Variant[Boolean, Enum['always', 'never', 'patched', 'smart']]]`
356+
Data type: `Variant[Boolean, Enum['always', 'never', 'patched', 'smart']]`
357357

358358
Should the server reboot after patching has been applied? (Defaults to 'never')
359359

360360
##### `timeout`
361361

362-
Data type: `Optional[Integer]`
362+
Data type: `Integer`
363363

364364
How many seconds should we wait until timing out the patch run? (Defaults to 3600 seconds)
365365

366366
##### `security_only`
367367

368-
Data type: `Optional[Boolean]`
368+
Data type: `Boolean`
369369

370370
Limit patches to those tagged as security related? (Defaults to false)
371371

372372
##### `clean_cache`
373373

374-
Data type: `Optional[Boolean]`
374+
Data type: `Boolean`
375375

376376
Should the yum/dpkg caches be cleaned at the start of the task? (Defaults to false)
377377

tasks/patch_server.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,23 @@
1515
},
1616
"reboot": {
1717
"description": "Should the server reboot after patching has been applied? (Defaults to 'never')",
18-
"type": "Optional[Variant[Boolean, Enum['always', 'never', 'patched', 'smart']]]"
18+
"type": "Variant[Boolean, Enum['always', 'never', 'patched', 'smart']]",
19+
"default": "never"
1920
},
2021
"timeout": {
2122
"description": "How many seconds should we wait until timing out the patch run? (Defaults to 3600 seconds)",
22-
"type": "Optional[Integer]"
23+
"type": "Integer",
24+
"default": 3600
2325
},
2426
"security_only": {
2527
"description": "Limit patches to those tagged as security related? (Defaults to false)",
26-
"type": "Optional[Boolean]"
28+
"type": "Boolean",
29+
"default": false
2730
},
2831
"clean_cache": {
2932
"description": "Should the yum/dpkg caches be cleaned at the start of the task? (Defaults to false)",
30-
"type": "Optional[Boolean]"
33+
"type": "Boolean",
34+
"default": false
3135
}
3236
},
3337
"implementations": [

0 commit comments

Comments
 (0)