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

Commit

Permalink
Merge pull request #269 from digitalrebar/exit-default-ipxe-fail-lock…
Browse files Browse the repository at this point in the history
…-stage

Exit default ipxe fail lock stage
  • Loading branch information
galthaus authored May 16, 2019
2 parents e884866 + 5e06068 commit 89569af
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/bootenvs/discovery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ Templates:
Path: "default.ipxe"
Contents: |
#!ipxe
chain {{.ProvisionerURL}}/${netX/mac}.ipxe && exit || goto chainip
chain {{.ProvisionerURL}}/${netX/mac}.ipxe && exit 1 || goto chainip
:chainip
chain {{.ProvisionerURL}}/${netX/ip}.ipxe && exit || goto sledgehammer
chain {{.ProvisionerURL}}/${netX/ip}.ipxe && exit 1 || goto sledgehammer
:sledgehammer
chain {{.ProvisionerURL}}/${builtin/buildarch}.ipxe
- Name: "ipxe-i386"
Expand Down
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 89569af

Please sign in to comment.