File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,15 @@ Install Litmus as a gem by running `gem install puppet_litmus`.
2929
3030- Note if you choose to override the ` litmus_inventory.yaml ` location, please ensure that the directory structure you define exists.
3131
32+ ## Install a specific puppet agent version
33+
34+ To install a specific version of the puppet agent, you can export the ` PUPPET_VERSION ` env var, like below:
35+ ```
36+ export PUPPET_VERSION=8.8.1
37+ ```
38+
39+ When set, the ` litmus:install_agent ` rake task will install the specified version. The default is ` latest ` .
40+
3241## matrix_from_metadata_v3
3342
3443matrix_from_metadata_v3 tool generates a github action matrix from the supported operating systems listed in the module's metadata.json.
Original file line number Diff line number Diff line change @@ -129,11 +129,11 @@ def tear_down(node_name, inventory_hash)
129129
130130 def install_agent ( collection , targets , inventory_hash )
131131 include ::BoltSpec ::Run
132- params = if collection . nil?
133- { }
134- else
135- { 'collection' => collection }
136- end
132+ puppet_version = ENV . fetch ( 'PUPPET_VERSION' , nil )
133+ params = { }
134+ params [ 'collection' ] = collection if collection
135+ params [ 'version' ] = puppet_version if puppet_version
136+
137137 raise "puppet_agent was not found in #{ DEFAULT_CONFIG_DATA [ 'modulepath' ] } , please amend the .fixtures.yml file" \
138138 unless File . directory? ( File . join ( DEFAULT_CONFIG_DATA [ 'modulepath' ] , 'puppet_agent' ) )
139139
You can’t perform that action at this time.
0 commit comments