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.
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 48 49 50 |
# File 'lib/vault/provision.rb', line 23 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::Audit, 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.
19 20 21 |
# File 'lib/vault/provision.rb', line 19 def aws_update_creds @aws_update_creds end |
#instance_dir ⇒ Object
Returns the value of attribute instance_dir.
19 20 21 |
# File 'lib/vault/provision.rb', line 19 def instance_dir @instance_dir end |
#intermediate_issuer ⇒ Object
Returns the value of attribute intermediate_issuer.
19 20 21 |
# File 'lib/vault/provision.rb', line 19 def intermediate_issuer @intermediate_issuer end |
#pki_allow_destructive ⇒ Object
Returns the value of attribute pki_allow_destructive.
19 20 21 |
# File 'lib/vault/provision.rb', line 19 def pki_allow_destructive @pki_allow_destructive end |
#vault ⇒ Object
Returns the value of attribute vault.
19 20 21 |
# File 'lib/vault/provision.rb', line 19 def vault @vault end |
Instance Method Details
#pki_force? ⇒ Boolean
59 60 61 |
# File 'lib/vault/provision.rb', line 59 def pki_force? @pki_force end |
#provision! ⇒ Object
52 53 54 55 56 57 |
# File 'lib/vault/provision.rb', line 52 def provision! @handlers.each do |handler| puts "* Calling handler #{handler}" handler.new(self).provision! end end |