diff --git a/dev/vault/README.md b/dev/vault/README.md index 792855158..0ac801a03 100644 --- a/dev/vault/README.md +++ b/dev/vault/README.md @@ -14,9 +14,9 @@ for the Nomad servers (must be in nomad/dev/vault): ```shell export VAULT_ADDR='http://127.0.0.1:8200' -vault policy-write nomad-server nomad-server-policy.hcl +vault policy write nomad-server nomad-server-policy.hcl vault write /auth/token/roles/nomad-cluster @nomad-cluster-role.json -vault token-create -policy nomad-server -period 72h -orphan +vault token create -policy nomad-server -period 72h -orphan ``` You can then run Nomad using the generated token. An example would be: diff --git a/website/source/docs/vault-integration/index.html.md b/website/source/docs/vault-integration/index.html.md index a8e5d9ad8..75cc844b3 100644 --- a/website/source/docs/vault-integration/index.html.md +++ b/website/source/docs/vault-integration/index.html.md @@ -115,7 +115,7 @@ available for download. Below is an example of writing this policy to Vault: $ curl https://nomadproject.io/data/vault/nomad-server-policy.hcl -O -s -L # Write the policy to Vault -$ vault policy-write nomad-server nomad-server-policy.hcl +$ vault policy write nomad-server nomad-server-policy.hcl ``` #### Vault Token Role Configuration @@ -230,7 +230,7 @@ $ curl https://nomadproject.io/data/vault/nomad-server-policy.hcl -O -s -L $ curl https://nomadproject.io/data/vault/nomad-cluster-role.json -O -s -L # Write the policy to Vault -$ vault policy-write nomad-server nomad-server-policy.hcl +$ vault policy write nomad-server nomad-server-policy.hcl # Create the token role with Vault $ vault write /auth/token/roles/nomad-cluster @nomad-cluster-role.json @@ -242,7 +242,7 @@ After the token role is created, a token suitable for the Nomad servers may be retrieved by issuing the following Vault command: ``` -$ vault token-create -policy nomad-server -period 72h -orphan +$ vault token create -policy nomad-server -period 72h -orphan Key Value --- ----- token f02f01c2-c0d1-7cb7-6b88-8a14fada58c0 diff --git a/website/source/guides/acl.html.markdown b/website/source/guides/acl.html.markdown index bfacd2b1e..85733e543 100644 --- a/website/source/guides/acl.html.markdown +++ b/website/source/guides/acl.html.markdown @@ -465,7 +465,7 @@ role: ``` $ echo 'path "nomad/creds/role-name" { capabilities = ["read"] -}' | vault policy-write nomad-user-policy - +}' | vault policy write nomad-user-policy - Policy 'nomad-user-policy' written. ``` @@ -474,7 +474,7 @@ a role available on the [Authentication backends page](https://www.vaultproject. Otherwise, for testing purposes, a Vault token can be generated associated with the policy: ``` -$ vault token-create -policy=nomad-user-policy +$ vault token create -policy=nomad-user-policy Key Value --- ----- token deedfa83-99b5-34a1-278d-e8fb76809a5b