Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
Add A lock stage that can lock a machine
Browse files Browse the repository at this point in the history
  • Loading branch information
galthaus committed May 16, 2019
1 parent 204185d commit 5e06068
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
9 changes: 9 additions & 0 deletions content/stages/lock-machine.yaml
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"
20 changes: 20 additions & 0 deletions content/tasks/lock-machine.yaml
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"

0 comments on commit 5e06068

Please sign in to comment.