Skip to content

Commit

Permalink
Bugfix in ctxt_agent managing node ips
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Dec 18, 2015
1 parent 084f6ef commit 59cf3eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contextualization/ctxt_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,14 +270,14 @@ def removeRequiretty(vm, pk_file):
def replace_vm_ip(old_ip, new_ip):
# Replace the IP with the one that is actually working
# in the inventory and in the general info file
filename = general_conf_data['conf_dir'] + "/hosts"
filename = conf_data_filename
with open(filename) as f:
inventoy_data = f.read().replace(old_ip, new_ip)

with open(filename, 'w+') as f:
f.write(inventoy_data)

filename = conf_data_filename
filename = general_conf_data['conf_dir'] + "/hosts"
with open(filename) as f:
inventoy_data = ""
for line in f:
Expand Down

0 comments on commit 59cf3eb

Please sign in to comment.