Skip to content

Commit

Permalink
Fix py3 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Jul 28, 2020
1 parent 080ab44 commit db8eb4e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions IM/ConfManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,11 +765,11 @@ def generate_playbook(self, vm, ctxt_elem, tmp_dir):
if vault_password:
vault_edit = self.get_vault_editor(vault_password)
if configure.recipes.strip().startswith("$ANSIBLE_VAULT"):
recipes = str(vault_edit.vault.decrypt(configure.recipes.strip()))
recipes = vault_edit.vault.decrypt(configure.recipes.strip()).decode()
else:
recipes = configure.recipes
conf_content = merge_recipes(conf_content, recipes)
conf_content = str(vault_edit.vault.encrypt(conf_content))
conf_content = vault_edit.vault.encrypt(conf_content).decode()
else:
conf_content = merge_recipes(conf_content, configure.recipes)

Expand Down Expand Up @@ -1026,8 +1026,7 @@ def generate_playbooks_and_hosts(self):
for ctxt_elem in contextualizes[ctxt_num]:
if ctxt_elem.system in vm_group and ctxt_elem.get_ctxt_tool() == "Ansible":
vm = vm_group[ctxt_elem.system][0]
filenames.extend(self.generate_playbook(
vm, ctxt_elem, tmp_dir))
filenames.extend(self.generate_playbook(vm, ctxt_elem, tmp_dir))

filenames.append(self.generate_etc_hosts(tmp_dir))
filenames.append(self.generate_inventory(tmp_dir))
Expand Down

0 comments on commit db8eb4e

Please sign in to comment.