Module: HybridPlatformsConductor::HpcPlugins::SecretsReader::Keepass::ConfigDSLExtension

Defined in:
lib/hybrid_platforms_conductor/hpc_plugins/secrets_reader/keepass.rb

Overview

Extend the Config DSL

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#keepass_secretsObject (readonly)

List of defined KeePass secrets. Each info has the following properties:

  • nodes_selectors_stack (Array<Object>): Stack of nodes selectors impacted by this rule.

  • database (String): Database file path.

  • group_path (Array<String>): Group path to extract from.

Array< Hash<Symbol, Object> >



30
31
32
# File 'lib/hybrid_platforms_conductor/hpc_plugins/secrets_reader/keepass.rb', line 30

def keepass_secrets
  @keepass_secrets
end

#kpscriptObject (readonly)

String: The KPScript command line



33
34
35
# File 'lib/hybrid_platforms_conductor/hpc_plugins/secrets_reader/keepass.rb', line 33

def kpscript
  @kpscript
end

Instance Method Details

#init_keepass_configObject

Mixin initializer



36
37
38
39
# File 'lib/hybrid_platforms_conductor/hpc_plugins/secrets_reader/keepass.rb', line 36

def init_keepass_config
  @keepass_secrets = []
  @kpscript = nil
end

#secrets_from_keepass(database:, group_path: []) ⇒ Object

Set a KeePass database configuration

Parameters
  • database (String): Database file path.

  • group_path (Array<String>): Group path to extract from [default: []].



54
55
56
57
58
59
60
# File 'lib/hybrid_platforms_conductor/hpc_plugins/secrets_reader/keepass.rb', line 54

def secrets_from_keepass(database:, group_path: [])
  @keepass_secrets << {
    nodes_selectors_stack: current_nodes_selectors_stack,
    database: database,
    group_path: group_path
  }
end

#use_kpscript_from(cmd) ⇒ Object

Set the KPScript command line

Parameters
  • cmd (String): KPScript command line



45
46
47
# File 'lib/hybrid_platforms_conductor/hpc_plugins/secrets_reader/keepass.rb', line 45

def use_kpscript_from(cmd)
  @kpscript = cmd
end