Giter Club home page Giter Club logo

ansible-vault's Introduction

No Maintenance Intended

vault

![Build Status](https://travis-ci.org/kbrebanov/ansible-vault.svg?branch=ma ster)

Installs and configures Vault

Requirements

This role requires Ansible 1.9 or higher.

Role Variables

Name Default Description
vault_version 0.6.2 Version of Vault to install
vault_sha256sum 91432c812b1264306f8d1ecf7dd237c3d7a8b2b6aebf4f887e487c4e7f69338c SHA 256 checksum of package
vault_backend inmem Configures the storage backend where Vault data is stored
vault_disable_mlock false If true, this will disable the server from executing the mlock syscall to prevent memory from being swapped to disk
vault_default_lease_ttl "720h" Configures the default lease duration for tokens and secrets, specified in hours
vault_max_lease_ttl "720h" Configures the maximum possible lease duration for tokens and secrets, specified in hours
vault_telemetry false Enable or disable telemetry
vault_backend_consul_path "vault/" The path within Consul where data will be stored
vault_backend_consul_address '' The address of the Consul agent to talk to
vault_backend_consul_scheme '' "http" or "https" for talking to Consul
vault_backend_consul_datacenter '' The datacenter within Consul to write to
vault_backend_consul_token '' An access token to use to write data to Consul
vault_backend_consul_tls_skip_verify false Enable or disable TLS host verification for Consul communication
vault_backend_consul_tls_ca_file '' The path to the CA certificate used for Consul communication
vault_backend_consul_tls_cert_file '' The path to the certificate for Consul communication
vault_backend_consul_tls_key_file '' The path to the private key for Consul communication
vault_backend_consul_redirect_addr '' This is the address to advertise to other Vault servers in the cluster for client redirection
vault_backend_consul_cluster_addr '' This is the address to advertise to other Vault servers in the cluster for request forwarding
vault_backend_zookeeper_path "vault/" The path within Zookeeper where data will be stored
vault_backend_zookeeper_address "http://localhost:4001" The address(es) of the Zookeeper instance(s) to talk to. Can be comma separated list (host:port) of many Zookeeper instances
vault_backend_zookeeper_redirect_addr '' This is the address to advertise to other Vault servers in the cluster for client redirection
vault_backend_zookeeper_cluster_addr '' This is the address to advertise to other Vault servers in the cluster for request forwarding
vault_backend_etcd_path "vault/" The path within etcd where data will be stored
vault_backend_etcd_address "localhost:2181" The address(es) of the etcd instance(s) to talk to. Can be comma separated list (protocol://host:port) of many etcd instances
vault_backend_etcd_redirect_addr '' This is the address to advertise to other Vault servers in the cluster for client redirection
vault_backend_etcd_cluster_addr '' This is the address to advertise to other Vault servers in the cluster for request forwarding
vault_backend_s3_bucket '' The name of the S3 bucket to use
vault_backend_s3_access_key '' The AWS access key
vault_backend_s3_secret_key '' The AWS secret key
vault_backend_s3_session_token '' The AWS session_token
vault_backend_s3_region "us-east-1" The AWS region
vault_backend_mysql_username '' The MySQL username to connect with
vault_backend_mysql_password '' The MySQL password to connect with
vault_backend_mysql_address "127.0.0.1:3306" The address of the MySQL host
vault_backend_mysql_database "vault" The name of the database to use
vault_backend_mysql_table "vault" The name of the table to use
vault_backend_mysql_tls_ca_file '' The path to the CA certificate to connect using TLS
vault_backend_file_path '' The path on disk to a directory where the data will be stored
vault_listener_tcp_address "127.0.0.1:8200" The address to bind to for listening
vault_listener_tcp_tls_disable true Enable or disable TLS
vault_listener_tcp_tls_cert_file '' The path to the certificate for TLS
vault_listener_tcp_tls_key_file '' The path to the private key for the certificate
vault_listener_tcp_tls_min_version "tls12" Specifies the minimum supported version of TLS. Accepted values are "tls10", "tls11" or "tls12"
vault_telemetry_statsite_address '' An address to a Statsite instance for metrics
vault_telemetry_statsd_address '' An address to a StatsD instance for metrics
vault_telemetry_disable_hostname false Whether or not to prepend runtime telemetry with the machines hostname

Dependencies

  • kbrebanov.unzip

Example Playbook

Install Vault using Consul backend

- hosts: all
  roles:
    - kbrebanov.vault

License

BSD

Author Information

Kevin Brebanov

ansible-vault's People

Contributors

kbrebanov avatar milk avatar msabramo avatar timbroder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ansible-vault's Issues

As a user I would like to see that vault is upgraded if the version is greater than the current installed one

Although the version is greater than the installed one, a newer version is not downloaded.

TASK [kbrebanov.vault : Download Vault] *****************************************************************
ok: [localhost]

TASK [kbrebanov.vault : Remove Vault files if version is different] *************************************
changed: [localhost] => (item=/usr/local/bin/vault)

TASK [kbrebanov.vault : Unzip Vault to installation directory] ******************************************
changed: [localhost]

If vault is running, it will not be upgraded

When increasing the vault version on subsequent runs, ansible-vault will download the new version and unzip it correctly but will fail silently when trying to move it to vault_install_dir

Vault fails to start

In order to use mlock you need to be root, but by default the role sets disable_mlock to false but tries to run vault as the vault user/group in the upstart template, which prevents vault from starting (Ubuntu 12.04):

Error initializing core: Failed to lock memory: cannot allocate memory

This usually means that the mlock syscall is not available.
Vault uses mlock to prevent memory from being swapped to
disk. This requires root privileges as well as a machine
that supports mlock. Please enable mlock on your system or
disable Vault from using it. To disable Vault from using it,
set the `disable_mlock` configuration option in your configuration
file.

Setting vault_user and vault_group to root created system accounts called root, which broke the world.

Suggest that by:

  • Default vault is run as root
  • Don't try and create user and group if set to root
  • If user != root set disable_mlock: true

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.