Skip to content

Commit

Permalink
Fix generation of ansible commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Qalthos committed Nov 19, 2024
1 parent 7e14cf1 commit e470eb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/molecule/provisioner/ansible_playbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def execute(self, action_args: list[str] | None = None) -> str: # noqa: ARG002
Returns:
Output from ansible-playbook.
"""
if self._ansible_command is None:
if not self._ansible_command:
self.bake()

if not self._playbook:
Expand Down
4 changes: 1 addition & 3 deletions src/molecule/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,11 @@ def run_command( # noqa: PLR0913
Raises:
CalledProcessError: If return code is nonzero and check is True.
"""
args = cmd

if debug:
print_environment_vars(env)

result = app.runtime.run(
args=args,
args=cmd,
env=env,
cwd=cwd,
tee=True,
Expand Down

0 comments on commit e470eb3

Please sign in to comment.