Skip to content

Commit

Permalink
Merge pull request #15 from wcm-io-devops/feature/conga_basedir_play_…
Browse files Browse the repository at this point in the history
…level

Allow to set conga_basedir on a play level
  • Loading branch information
tobias-richter authored Sep 11, 2023
2 parents 2dcd448 + 0afaaa9 commit db68cb4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions action_plugins/conga_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ def depending_role(self):
def conga_basedir(self):
# Get CONGA basedir from the host vars of the host CONGA was executed on
# Currently this has to be localhost, since we need access to the generated files

# Check if conga_basedir was defined explicitly in play variables or via set_facts.
conga_basedir = self._get_arg_or_var("conga_basedir", None, False)
if conga_basedir:
return conga_basedir

conga_host = self._get_arg_or_var('conga_host', 'localhost')
conga_basedir = self._task_vars['hostvars'].get(conga_host, {}).get('conga_basedir')
if not conga_basedir:
Expand Down

0 comments on commit db68cb4

Please sign in to comment.