Class: Vault::Provision
- Inherits:
-
Object
- Object
- Vault::Provision
- Defined in:
- lib/vault/provision.rb,
lib/vault/provision.rb
Overview
controller for the children
Constant Summary collapse
- SYSTEM_POLICIES =
['response-wrapping', 'root'].freeze
Instance Attribute Summary collapse
-
#aws_update_creds ⇒ Object
Returns the value of attribute aws_update_creds.
-
#instance_dir ⇒ Object
Returns the value of attribute instance_dir.
-
#intermediate_issuer ⇒ Object
Returns the value of attribute intermediate_issuer.
-
#pki_allow_destructive ⇒ Object
Returns the value of attribute pki_allow_destructive.
-
#vault ⇒ Object
Returns the value of attribute vault.
Instance Method Summary collapse
-
#initialize(instance_dir, address: , token: , aws_update_creds: false, intermediate_issuer: {}, pki_allow_destructive: false) ⇒ Provision
constructor
A new instance of Provision.
- #pki_force? ⇒ Boolean
- #provision! ⇒ Object
Constructor Details
#initialize(instance_dir, address: , token: , aws_update_creds: false, intermediate_issuer: {}, pki_allow_destructive: false) ⇒ Provision
Returns a new instance of Provision.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/vault/provision.rb', line 21 def initialize instance_dir, address: ENV['VAULT_ADDR'], token: ENV['VAULT_TOKEN'], aws_update_creds: false, intermediate_issuer: {}, pki_allow_destructive: false @instance_dir = instance_dir @vault = Vault::Client.new address: address, token: token @aws_update_creds = aws_update_creds @intermediate_issuer = intermediate_issuer @pki_allow_destructive = pki_allow_destructive @handlers = [ Sys::Auth, Auth::Ldap::Config, Sys::Mounts, Pki::Root::Generate::Internal, Pki::Intermediate::Generate::Internal, Pki::Config::Urls, Pki::Roles, Secret, Aws::SecretBackend, Sys::Policy, Auth::Ldap::Groups, Auth::Approle ] end |
Instance Attribute Details
#aws_update_creds ⇒ Object
Returns the value of attribute aws_update_creds.
17 18 19 |
# File 'lib/vault/provision.rb', line 17 def aws_update_creds @aws_update_creds end |
#instance_dir ⇒ Object
Returns the value of attribute instance_dir.
17 18 19 |
# File 'lib/vault/provision.rb', line 17 def instance_dir @instance_dir end |
#intermediate_issuer ⇒ Object
Returns the value of attribute intermediate_issuer.
17 18 19 |
# File 'lib/vault/provision.rb', line 17 def intermediate_issuer @intermediate_issuer end |
#pki_allow_destructive ⇒ Object
Returns the value of attribute pki_allow_destructive.
17 18 19 |
# File 'lib/vault/provision.rb', line 17 def pki_allow_destructive @pki_allow_destructive end |
#vault ⇒ Object
Returns the value of attribute vault.
17 18 19 |
# File 'lib/vault/provision.rb', line 17 def vault @vault end |
Instance Method Details
#pki_force? ⇒ Boolean
56 57 58 |
# File 'lib/vault/provision.rb', line 56 def pki_force? @pki_force end |
#provision! ⇒ Object
49 50 51 52 53 54 |
# File 'lib/vault/provision.rb', line 49 def provision! @handlers.each do |handler| puts "* Calling handler #{handler}" handler.new(self).provision! end end |