Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
release 0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Clivern committed Jun 28, 2023
1 parent 1dc8161 commit 74271ec
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog
=========

Version 0.3.0
=============

- Show ansible output on recipe run.


Version 0.2.3
=============

Expand Down
2 changes: 1 addition & 1 deletion recipe/motd/recipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


vars:
version: v0.2
version: v0.3

templates:
motd.j2: motd.j2
Expand Down
20 changes: 7 additions & 13 deletions src/flook/command/recipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,10 @@ def run(self, name, host_name, tag):
if len(hosts) == 0:
raise click.ClickException(f"No hosts matching!")

with yaspin(text="Running recipe..", color="cyan") as sp:
pb_id = str(uuid.uuid4())
pb = Playbook(
pb_id, self._configs["cache"]["path"].rstrip("/"), hosts, recipe
)
pb.build()
result = pb.run()
pb.cleanup()

if result:
sp.write("Recipe finished successfully!")
else:
sp.write("Oops! recipe failed.")
pb = Playbook(
str(uuid.uuid4()), self._configs["cache"]["path"].rstrip("/"), hosts, recipe
)

pb.build()
pb.run()
pb.cleanup()
2 changes: 0 additions & 2 deletions src/flook/module/playbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def build(self):
hosts = "[remote]\n"

for host in self._hosts:

if host.connection == "local":
hosts = (
hosts
Expand Down Expand Up @@ -101,7 +100,6 @@ def run(self):
private_data_dir="{}/{}/cache".format(self._cache, self._id),
playbook="{}/{}/playbook.yml".format(self._cache, self._id),
inventory="{}/{}/hosts".format(self._cache, self._id),
quiet=True,
)

if out.status.lower() == "failed":
Expand Down

0 comments on commit 74271ec

Please sign in to comment.