Class: PEBuild::Config::Global
- Inherits:
-
Object
- Object
- PEBuild::Config::Global
- Includes:
- PEBuild::ConfigDefault
- Defined in:
- lib/pe_build/config/global.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#download_root ⇒ String
The root URI from which to download packages.
-
#filename ⇒ String
The exact name of the PE installer archive.
-
#series ⇒ String
The release series of PE.
-
#shared_installer ⇒ Boolean
Whether to run PE installation using installers and answers shared using the
/vagrant
mount. -
#suffix ⇒ String
The distribution specifix suffix of the Puppet Enterprise installer to use.
-
#version ⇒ String
The version of PE to install.
-
#version_file ⇒ String, URI
A fully-qualified URI or a path relative to
download_root
.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Global
constructor
A new instance of Global.
- #validate(machine) ⇒ Object
Constructor Details
#initialize ⇒ Global
Returns a new instance of Global.
57 58 59 60 61 62 63 64 65 |
# File 'lib/pe_build/config/global.rb', line 57 def initialize @download_root = UNSET_VALUE @version = UNSET_VALUE @version_file = UNSET_VALUE @series = UNSET_VALUE @suffix = UNSET_VALUE @filename = UNSET_VALUE @shared_installer = UNSET_VALUE end |
Instance Attribute Details
#download_root ⇒ String
Returns The root URI from which to download packages. The URI scheme must be one of the values listed in Transfer::IMPLEMENTATIONS.
12 13 14 |
# File 'lib/pe_build/config/global.rb', line 12 def download_root @download_root end |
#filename ⇒ String
Returns The exact name of the PE installer archive. If missing, a name will be constructed from #version.
46 47 48 |
# File 'lib/pe_build/config/global.rb', line 46 def filename @filename end |
#series ⇒ String
Returns The release series of PE. Completely optional and
currently has no effect other than being an interpolation token
available for use in download_root
.
34 35 36 |
# File 'lib/pe_build/config/global.rb', line 34 def series @series end |
#shared_installer ⇒ Boolean
Returns Whether to run PE installation using installers and
answers shared using the /vagrant
mount. If set to false
, resources
will be downloaded remotely to the home directory of whichever user
account Vagrant is using. Defaults to true
.
55 56 57 |
# File 'lib/pe_build/config/global.rb', line 55 def shared_installer @shared_installer end |
#suffix ⇒ String
Returns The distribution specifix suffix of the Puppet Enterprise installer to use.
40 41 42 |
# File 'lib/pe_build/config/global.rb', line 40 def suffix @suffix end |
#version ⇒ String
Returns The version of PE to install. Must conform to
x.y.x[-optional-arbitrary-stuff]
. Used to determine the name of the
PE installer archive if filename
is unset.
19 20 21 |
# File 'lib/pe_build/config/global.rb', line 19 def version @version end |
#version_file ⇒ String, URI
Returns A fully-qualified URI or a path relative to
download_root
. The contents of this file will be read and used to
Specify version
.
26 27 28 |
# File 'lib/pe_build/config/global.rb', line 26 def version_file @version_file end |
Instance Method Details
#finalize! ⇒ Object
69 70 71 72 73 74 75 76 77 |
# File 'lib/pe_build/config/global.rb', line 69 def finalize! set_default :@version, nil set_default :@version_file, nil set_default :@series, nil set_default :@suffix, :detect set_default :@download_root, nil set_default :@filename, nil set_default :@shared_installer, true end |
#validate(machine) ⇒ Object
79 80 81 82 83 84 85 86 |
# File 'lib/pe_build/config/global.rb', line 79 def validate(machine) errors = [] validate_version(errors, machine) validate_download_root(errors, machine) {"PE build global config" => errors} end |