Class: VagrantBolt::ConfigBuilder::Config

Inherits:
ConfigBuilder::Model::Base
  • Object
show all
Defined in:
lib/vagrant-bolt/config_builder/config.rb

Direct Known Subclasses

Triggers

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argsString

Returns Additional arguments for the bolt command.

Returns:

  • (String)

    Additional arguments for the bolt command



9
# File 'lib/vagrant-bolt/config_builder/config.rb', line 9

def_model_attribute :args

#bolt_exeString

Returns The full path to the bolt command. If not passed in, the default from PATH will be used.

Returns:

  • (String)

    The full path to the bolt command. If not passed in, the default from PATH will be used.



13
# File 'lib/vagrant-bolt/config_builder/config.rb', line 13

def_model_attribute :bolt_exe

#boltdirString

Returns DEPRECATED use project. The bolt working directory. Defaults to ..

Returns:

  • (String)

    DEPRECATED use project. The bolt working directory. Defaults to .



17
# File 'lib/vagrant-bolt/config_builder/config.rb', line 17

def_model_attribute :boltdir

#commandSymbol

Returns Whether bolt should use a task or plan.

Returns:

  • (Symbol)

    Whether bolt should use a task or plan



81
# File 'lib/vagrant-bolt/config_builder/config.rb', line 81

def_model_attribute :command

#connect_timeoutString

Returns The timeout for the ssh connection (linux).

Returns:

  • (String)

    The timeout for the ssh connection (linux)



25
# File 'lib/vagrant-bolt/config_builder/config.rb', line 25

def_model_attribute :connect_timeout

#debugBoolean

Returns Shows debug logging.

Returns:

  • (Boolean)

    Shows debug logging



21
# File 'lib/vagrant-bolt/config_builder/config.rb', line 21

def_model_attribute :debug

#excludesArray<String, Symbol>

Note: The target_list will override this setting. Note: This will be merged with targets, with excludes taking precidence. Valid values are an array of machine names.

Returns:

  • (Array<String, Symbol>)

    The targets to exclude from running this task or plan on.



59
# File 'lib/vagrant-bolt/config_builder/config.rb', line 59

def_model_attribute :excludes

#factsHash

Returns A hash of facts for the machine.

Returns:

  • (Hash)

    A hash of facts for the machine



136
# File 'lib/vagrant-bolt/config_builder/config.rb', line 136

def_model_attribute :facts

#featuresArray<String>

Returns An array containing the features for this machine.

Returns:

  • (Array<String>)

    An array containing the features for this machine



144
# File 'lib/vagrant-bolt/config_builder/config.rb', line 144

def_model_attribute :features

#host_key_checkBoolean

Returns If the connection should check the host key on the remote host (linux).

Returns:

  • (Boolean)

    If the connection should check the host key on the remote host (linux)



29
# File 'lib/vagrant-bolt/config_builder/config.rb', line 29

def_model_attribute :host_key_check

#machine_aliasString

Returns The alias of the machine to set in the bolt inventory.

Returns:

  • (String)

    The alias of the machine to set in the bolt inventory



33
# File 'lib/vagrant-bolt/config_builder/config.rb', line 33

def_model_attribute :machine_alias

#machine_nameString

Returns The name of the machine to set in the bolt inventory.

Returns:

  • (String)

    The name of the machine to set in the bolt inventory



37
# File 'lib/vagrant-bolt/config_builder/config.rb', line 37

def_model_attribute :machine_name

#modulepathString

Returns The path to the modules.

Returns:

  • (String)

    The path to the modules.



41
# File 'lib/vagrant-bolt/config_builder/config.rb', line 41

def_model_attribute :modulepath

#nameString

Returns The name of task or plan to run.

Returns:

  • (String)

    The name of task or plan to run



45
# File 'lib/vagrant-bolt/config_builder/config.rb', line 45

def_model_attribute :name

#node_listString

DEPRECATED. Use target_list instead. This setting overrides nodes and needs to be in the protocol://ipaddress:port URI format

Returns:

  • (String)

    The bolt node list. This defaults to the current node.



65
# File 'lib/vagrant-bolt/config_builder/config.rb', line 65

def_model_attribute :node_list

#nodesArray<String, Symbol>, "ALL"

DEPRECATED. Use targets instead. Note: The node_list will override this setting. Valid values are an array of machine names or the string "ALL".

Returns:

  • (Array<String, Symbol>, "ALL")

    The nodes to run the task or plan on.



52
# File 'lib/vagrant-bolt/config_builder/config.rb', line 52

def_model_attribute :nodes

#noopBoolean

Returns If the command should be run with noop. Only valid with tasks and apply.

Returns:

  • (Boolean)

    If the command should be run with noop. Only valid with tasks and apply.



69
# File 'lib/vagrant-bolt/config_builder/config.rb', line 69

def_model_attribute :noop

#paramsHash

Returns The paramater hash for the task or plan.

Returns:

  • (Hash)

    The paramater hash for the task or plan



73
# File 'lib/vagrant-bolt/config_builder/config.rb', line 73

def_model_attribute :params

#passwordString

Returns The password to authenticate on the machine.

Returns:

  • (String)

    The password to authenticate on the machine.



89
# File 'lib/vagrant-bolt/config_builder/config.rb', line 89

def_model_attribute :password

#portString

Returns The port to connect to the machine.

Returns:

  • (String)

    The port to connect to the machine.



93
# File 'lib/vagrant-bolt/config_builder/config.rb', line 93

def_model_attribute :port

#private_keyString

Returns The path of the private_key to authenticate on the machine.

Returns:

  • (String)

    The path of the private_key to authenticate on the machine.



97
# File 'lib/vagrant-bolt/config_builder/config.rb', line 97

def_model_attribute :private_key

#projectString

Returns The bolt working directory. Defaults to ..

Returns:

  • (String)

    The bolt working directory. Defaults to .



77
# File 'lib/vagrant-bolt/config_builder/config.rb', line 77

def_model_attribute :project

#run_asString

Returns User to run as using privilege escalation.

Returns:

  • (String)

    User to run as using privilege escalation.



101
# File 'lib/vagrant-bolt/config_builder/config.rb', line 101

def_model_attribute :run_as

#sslBoolean

Returns If the connection should use SSL on with WinRM (Windows).

Returns:

  • (Boolean)

    If the connection should use SSL on with WinRM (Windows)



109
# File 'lib/vagrant-bolt/config_builder/config.rb', line 109

def_model_attribute :ssl

#ssl_verifyBoolean

Returns If the connection should verify SSL on with WinRM (Windows).

Returns:

  • (Boolean)

    If the connection should verify SSL on with WinRM (Windows)



113
# File 'lib/vagrant-bolt/config_builder/config.rb', line 113

def_model_attribute :ssl_verify

#sudo_passwordString

Returns The password to authenticate sudo on the machine.

Returns:

  • (String)

    The password to authenticate sudo on the machine.



105
# File 'lib/vagrant-bolt/config_builder/config.rb', line 105

def_model_attribute :sudo_password

#target_listString

This setting overrides targets and needs to be in the protocol://ipaddress:port URI format

Returns:

  • (String)

    The bolt target list. This defaults to the current target.



124
# File 'lib/vagrant-bolt/config_builder/config.rb', line 124

def_model_attribute :target_list

#targetsArray<String, Symbol>, "ALL"

Note: The target_list will override this setting. Valid values are an array of machine names or the string "ALL".

Returns:

  • (Array<String, Symbol>, "ALL")

    The targets to run the task or plan on.



119
# File 'lib/vagrant-bolt/config_builder/config.rb', line 119

def_model_attribute :targets

#tmpdirString

Returns The directory to upload and execute temporary files on the target.

Returns:

  • (String)

    The directory to upload and execute temporary files on the target



128
# File 'lib/vagrant-bolt/config_builder/config.rb', line 128

def_model_attribute :tmpdir

#userString

Returns The user to authenticate on the machine.

Returns:

  • (String)

    The user to authenticate on the machine.



85
# File 'lib/vagrant-bolt/config_builder/config.rb', line 85

def_model_attribute :user

#varsHash

Returns A hash of vars for the machine.

Returns:

  • (Hash)

    A hash of vars for the machine



140
# File 'lib/vagrant-bolt/config_builder/config.rb', line 140

def_model_attribute :vars

#verboseBoolean

Returns Shows verbose logging.

Returns:

  • (Boolean)

    Shows verbose logging



132
# File 'lib/vagrant-bolt/config_builder/config.rb', line 132

def_model_attribute :verbose

Instance Method Details

#to_procObject

rubocop:disable Metrics/BlockLength



147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/vagrant-bolt/config_builder/config.rb', line 147

def to_proc
  proc do |config|
    bolt = config.bolt
    with_attr(:args)            { |val| bolt.args            = val }
    with_attr(:bolt_exe)        { |val| bolt.bolt_exe        = val }
    with_attr(:command)         { |val| bolt.command         = val }
    with_attr(:boltdir)         { |val| bolt.boltdir         = val }
    with_attr(:debug)           { |val| bolt.debug           = val }
    with_attr(:connect_timeout) { |val| bolt.connect_timeout = val }
    with_attr(:host_key_check)  { |val| bolt.host_key_check  = val }
    with_attr(:machine_alias)   { |val| bolt.machine_alias   = val }
    with_attr(:machine_name)    { |val| bolt.machine_name    = val }
    with_attr(:modulepath)      { |val| bolt.modulepath      = val }
    with_attr(:name)            { |val| bolt.name            = val }
    with_attr(:nodes)           { |val| bolt.nodes           = val }
    with_attr(:noop)            { |val| bolt.noop            = val }
    with_attr(:excludes)        { |val| bolt.excludes        = val }
    with_attr(:node_list)       { |val| bolt.node_list       = val }
    with_attr(:params)          { |val| bolt.params          = val }
    with_attr(:user)            { |val| bolt.user            = val }
    with_attr(:password)        { |val| bolt.password        = val }
    with_attr(:port)            { |val| bolt.port            = val }
    with_attr(:private_key)     { |val| bolt.private_key     = val }
    with_attr(:project)         { |val| bolt.project         = val }
    with_attr(:run_as)          { |val| bolt.run_as          = val }
    with_attr(:sudo_password)   { |val| bolt.sudo_password   = val }
    with_attr(:ssl)             { |val| bolt.ssl             = val }
    with_attr(:ssl_verify)      { |val| bolt.ssl_verify      = val }
    with_attr(:targets)         { |val| bolt.targets         = val }
    with_attr(:target_list)     { |val| bolt.target_list     = val }
    with_attr(:tmpdir)          { |val| bolt.tmpdir          = val }
    with_attr(:verbose)         { |val| bolt.verbose         = val }
    with_attr(:facts)           { |val| bolt.facts           = val }
    with_attr(:features)        { |val| bolt.features        = val }
    with_attr(:vars)            { |val| bolt.vars            = val }
  end
end