github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/website/pages/docs/commands/sentinel/apply.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Commands: sentinel apply'
     4  sidebar_title: apply
     5  description: >
     6    The sentinel apply command is used to write a new, or update an existing,
     7    Sentinel policy.
     8  ---
     9  
    10  # Command: sentinel apply
    11  
    12  The `sentinel apply` command is used to write a new, or update an existing,
    13  Sentinel policy.
    14  
    15  ~> Sentinel commands are new in Nomad 0.7 and are only available with Nomad
    16  Enterprise.
    17  
    18  ## Usage
    19  
    20  ```plaintext
    21  nomad sentinel apply [options] <Policy Name> <Policy File>
    22  ```
    23  
    24  The `sentinel apply` command requires two arguments, the policy name and the
    25  policy file. The policy file can be read from stdin by specifying "-" as the
    26  file name.
    27  
    28  ## General Options
    29  
    30  @include 'general_options.mdx'
    31  
    32  ## Apply Options
    33  
    34  - `-description` : Sets a human readable description for the policy
    35  
    36  - `-scope` : (default: submit-job) Sets the scope of the policy and when it
    37    should be enforced.
    38  
    39  - `-level` : (default: advisory) Sets the enforcement level of the policy. Must
    40    be one of advisory, soft-mandatory, hard-mandatory.
    41  
    42  ## Examples
    43  
    44  Write a policy:
    45  
    46  ```shell-sessionnomad sentinel write -description "My test policy" foo test.sentinel
    47  Successfully wrote "foo" Sentinel policy!
    48  ```