Skip to content

Commit 3370249

Browse files
committed
fix tear_down from puppet_litmus
puppet_litmus gem is passing the target uri as the node_name param, which causes an InventoryHelper.lookup exception.
1 parent 775430e commit 3370249

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

tasks/docker.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def provision(docker_platform, inventory, vars)
207207
begin
208208
result = provision(platform, inventory, vars) if action == 'provision'
209209
if action == 'tear_down'
210-
node = inventory.lookup(name: node_name, group: 'ssh_nodes')
210+
node = inventory.lookup(node_name, group: 'ssh_nodes')
211211
result = docker_tear_down(node['facts']['container_id'])
212212
inventory.remove(node).save
213213
end

tasks/docker_exp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def provision(docker_platform, inventory, vars)
7979
begin
8080
result = provision(platform, inventory, vars) if action == 'provision'
8181
if action == 'tear_down'
82-
node = inventory.lookup(name: node_name, group: 'docker_nodes')
82+
node = inventory.lookup(node_name, group: 'docker_nodes')
8383
result = docker_tear_down(node['facts']['container_id'])
8484
inventory.remove(node).save
8585
end

tasks/provision_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def tear_down(node_name, inventory, _vars, retry_attempts)
138138
# remove all provisioned resources
139139
uri = URI.parse(ENV['SERVICE_URL'] || default_uri)
140140

141-
node = inventory.lookup(name: node_name)
141+
node = inventory.lookup(node_name)
142142
facts = node['facts']
143143
job_id = facts['uuid']
144144
response = invoke_cloud_request(job_id, uri, '', 'delete', retry_attempts)

tasks/vagrant.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def provision(platform, inventory, enable_synced_folder, provider, cpus, memory,
197197

198198
def tear_down(node_name, inventory)
199199
command = 'vagrant destroy -f'
200-
node = inventory.lookup(name: node_name, group: 'ssh_nodes')
200+
node = inventory.lookup(node_name, group: 'ssh_nodes')
201201
vagrant_env = node['facts']['vagrant_env']
202202
run_local_command(command, vagrant_env)
203203
FileUtils.rm_r(vagrant_env)

0 commit comments

Comments
 (0)