From 4b242107a11f3ecb72202825aa3d45c311ee18d9 Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Tue, 15 May 2018 13:51:39 -0400 Subject: [PATCH] Updated documentation and example --- README.rst | 39 +++++++++++++-------------- pillar.example | 72 ++++++++++++++++---------------------------------- 2 files changed, 42 insertions(+), 69 deletions(-) diff --git a/README.rst b/README.rst index 7cef76d..3834ee1 100644 --- a/README.rst +++ b/README.rst @@ -15,32 +15,31 @@ Available states ``vault`` ---------- -Install the vault binary +Installs and configures the Vault service. -``vault.server`` ---------------------- +``vault.install`` +----------------- -Install and configure the vault server +Downloads and installs the Vault binary file. -To use it, just include *vault.server* in your *top.sls*, and configure it using pillars: +``vault.config`` +---------------- -:: +Provision the Vault configuration files and sources. + +``vault.service`` +----------------- + +Adds the Vault service startup configuration or script to an operating system. + +To start the service during Salt run and enable it at boot time, you need to set the following Pillar: + +.. code:: yaml + + vault: + service: true - vault: - version: 0.7.0 - listen_protocol: tcp - listen_port: 8200 - listen_address: 0.0.0.0 - tls_disable: 0 - default_lease_ttl: 24h - max_lease_ttl: 24h - self_signed_cert: - enabled: false - backend: {} - dev_mode: true - service: - type: systemd Testing ======= diff --git a/pillar.example b/pillar.example index 6b484e7..ed1ee61 100644 --- a/pillar.example +++ b/pillar.example @@ -1,51 +1,25 @@ vault: - version: 0.7.0 - listen_protocol: tcp - listen_port: 8200 - listen_address: 0.0.0.0 - tls_disable: 0 - tls_cert_file: {} - tls_key_file: {} - default_lease_ttl: 4380h - max_lease_ttl: 43800h - self_signed_cert: - enabled: false - backend: {} - dev_mode: true - secure_download: true - service: - type: upstart - user: root - group: root - hashicorp_gpg_key: | - -----BEGIN PGP PUBLIC KEY BLOCK----- - Version: GnuPG v1 + # Start Vault agent service and enable it at boot time + service: True - mQENBFMORM0BCADBRyKO1MhCirazOSVwcfTr1xUxjPvfxD3hjUwHtjsOy/bT6p9f - W2mRPfwnq2JB5As+paL3UGDsSRDnK9KAxQb0NNF4+eVhr/EJ18s3wwX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E3bGeY8+AWaJAZ37wpWh1p0cAEQEAAYkBHwQYAQIA - CQUCUw5EzQIbDAAKCRBRhS2HNI/8TJntCAClU7TOO/X053eKF1jqNW4A1qpxctVc - z8eTcY8Om5O4f6a/rfxfNFKn9Qyja/OG1xWNobETy7MiMXYjaa8uUx5iFy6kMVaP - 0BXJ59NLZjMARGw6lVTYDTIvzqqqwLxgliSDfSnqUhubGwvykANPO+93BBx89MRG - unNoYGXtPlhNFrAsB1VR8+EyKLv2HQtGCPSFBhrjuzH3gxGibNDDdFQLxxuJWepJ - EK1UbTS4ms0NgZ2Uknqn1WRU1Ki7rE4sTy68iZtWpKQXZEJa0IGnuI2sSINGcXCJ - oEIgXTMyCILo34Fa/C6VCm2WBgz9zZO8/rHIiQm1J5zqz0DrDwKBUM9C - =LYpS - -----END PGP PUBLIC KEY BLOCK----- - hashicorp_key_id: 51852D87348FFC4C \ No newline at end of file + # Set user and group for Vault config files and running service + user: vault + group: vault + + version: 0.10.1 + + config: + data_dir: /var/lib/vault + listen_protocol: tcp + listen_port: 8200 + listen_address: 0.0.0.0 + tls_disable: 0 + tls_cert_file: '' + tls_key_file: '' + storage: + type: file + default_lease_ttl: 4380h + max_lease_ttl: 43800h + self_signed_cert: + enabled: false + dev_mode: true