Skip to content

Commit

Permalink
Merge pull request #268 from h0tw1r3/fix-docker-teardown
Browse files Browse the repository at this point in the history
fix tear_down from puppet_litmus
  • Loading branch information
jordanbreen28 authored Jul 9, 2024
2 parents 775430e + 3370249 commit ba875ea
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tasks/docker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def provision(docker_platform, inventory, vars)
begin
result = provision(platform, inventory, vars) if action == 'provision'
if action == 'tear_down'
node = inventory.lookup(name: node_name, group: 'ssh_nodes')
node = inventory.lookup(node_name, group: 'ssh_nodes')
result = docker_tear_down(node['facts']['container_id'])
inventory.remove(node).save
end
Expand Down
2 changes: 1 addition & 1 deletion tasks/docker_exp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def provision(docker_platform, inventory, vars)
begin
result = provision(platform, inventory, vars) if action == 'provision'
if action == 'tear_down'
node = inventory.lookup(name: node_name, group: 'docker_nodes')
node = inventory.lookup(node_name, group: 'docker_nodes')
result = docker_tear_down(node['facts']['container_id'])
inventory.remove(node).save
end
Expand Down
2 changes: 1 addition & 1 deletion tasks/provision_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def tear_down(node_name, inventory, _vars, retry_attempts)
# remove all provisioned resources
uri = URI.parse(ENV['SERVICE_URL'] || default_uri)

node = inventory.lookup(name: node_name)
node = inventory.lookup(node_name)
facts = node['facts']
job_id = facts['uuid']
response = invoke_cloud_request(job_id, uri, '', 'delete', retry_attempts)
Expand Down
2 changes: 1 addition & 1 deletion tasks/vagrant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def provision(platform, inventory, enable_synced_folder, provider, cpus, memory,

def tear_down(node_name, inventory)
command = 'vagrant destroy -f'
node = inventory.lookup(name: node_name, group: 'ssh_nodes')
node = inventory.lookup(node_name, group: 'ssh_nodes')
vagrant_env = node['facts']['vagrant_env']
run_local_command(command, vagrant_env)
FileUtils.rm_r(vagrant_env)
Expand Down

0 comments on commit ba875ea

Please sign in to comment.