Skip to content

Commit c637437

Browse files
authored
Merge branch 'main' into build-container-feature
2 parents a35cd8a + 803e1ea commit c637437

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

ctf/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616

1717
ENV = {}
18+
STATE = {"verbose": False}
1819
for k, v in os.environ.items():
1920
ENV[k] = v
2021

ctf/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from typer import Typer
77
from typing_extensions import Annotated
88

9-
from ctf import ENV, LOG
9+
from ctf import ENV, LOG, STATE
1010
from ctf.check import app as check_app
1111
from ctf.deploy import app as deploy_app
1212
from ctf.destroy import app as destroy_app
@@ -52,6 +52,7 @@ def global_options(
5252
if verbose:
5353
LOG.setLevel(logging.DEBUG)
5454
LOG.handlers[0].setLevel(logging.DEBUG)
55+
STATE["verbose"] = True
5556

5657
if location:
5758
ENV["CTF_ROOT_DIR"] = location

ctf/deploy.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import typer
88
from typing_extensions import Annotated
99

10-
from ctf import ENV
10+
from ctf import ENV, STATE
1111
from ctf.destroy import destroy
1212
from ctf.generate import generate
1313
from ctf.logger import LOG
@@ -279,6 +279,8 @@ def run_ansible_playbook(
279279
execute_common: bool = True,
280280
) -> None:
281281
extra_args = []
282+
if STATE["verbose"]:
283+
extra_args.append("-vvv")
282284
if remote:
283285
extra_args += ["-e", f"ansible_incus_remote={remote}"]
284286

0 commit comments

Comments
 (0)