This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add A lock stage that can lock a machine
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
Description: "Stage to lock the machine" | ||
Meta: | ||
color: "yellow" | ||
icon: "key" | ||
Name: "lock-machine" | ||
Reboot: false | ||
Tasks: | ||
- "lock-machine" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
Name: "lock-machine" | ||
Description: "Lock the machine to prevent further user changes" | ||
Documentation: | | ||
Sets Field: Lock | ||
Lock the machine so users can not alter the machine. | ||
Current tasks and machine actions will continue to run. | ||
Templates: | ||
- Name: "lock-me" | ||
Contents: | | ||
#!/usr/bin/env bash | ||
{{ template "setup.tmpl" . }} | ||
echo "Running drpcli command to lock machine" | ||
drpcli machines update {{.Machine.UUID}} '{ "Locked": true }' | ||
Meta: | ||
icon: "key" | ||
color: "blue" | ||
title: "Digital Rebar Community Content" | ||
feature-flags: "sane-exit-codes" |