open-nomad/website/source/docs/commands/sentinel/apply.html.md.erb
Alex Dadgar e5ec915ac3 sync
2017-09-19 10:08:23 -05:00

43 lines
1.1 KiB
Plaintext

---
layout: "docs"
page_title: "Commands: sentinel apply"
sidebar_current: "docs-commands-sentinel-apply"
description: >
The sentinel apply command is used to write a new, or update an existing, Sentinel policy.
---
# Command: sentinel apply
The `sentinel apply` command is used to write a new, or update an existing, Sentinel policy.
## Usage
```
nomad sentinel apply [options] <Policy Name> <Policy File>
```
The `sentinel apply` command requires two arguments, the policy name and the policy file.
The policy file can be read from stdin by specifying "-" as the file name.
## General Options
<%= partial "docs/commands/_general_options" %>
## Apply Options
* `-description` : Sets a human readable description for the policy
* `-scope` : (default: submit-job) Sets the scope of the policy and when it should be enforced.
* `-level` : (default: advisory) Sets the enforcment level of the policy. Must be one of advisory,
soft-mandatory, hard-mandatory.
## Examples
Write a policy:
```
$ nomad sentinel write -description "My test policy" foo test.sentinel
Successfully wrote "foo" Sentinel policy!
```