Skip to content

Commit

Permalink
Merge pull request #27 from nhosoi/roletoinclude
Browse files Browse the repository at this point in the history
lsr_role2collection.py - converting the value of roletoinclude
  • Loading branch information
nhosoi authored Oct 30, 2020
2 parents 3282103 + 0f5270d commit 52c66c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lsr_role2collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,10 @@ def vars_cb(self, a_item, ru_item):
"""handle vars of Ansible item, or vars from a vars file"""
for var in a_item.get("vars", []):
logging.debug(f"\tvar = {var}")
if var == "roletoinclude":
lsr_rolename = self.src_owner + "." + self.rolename
if a_item["vars"][var] == lsr_rolename:
ru_item["vars"][var] = self.prefix + self.rolename
return

def meta_cb(self, a_item, ru_item):
Expand Down

0 comments on commit 52c66c9

Please sign in to comment.