Skip to content

Commit c9f830b

Browse files
committed
Force ansible color output through test runner
1 parent b1d1dfc commit c9f830b

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

.github/workflows/molecule-test.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,11 @@ jobs:
2525
qemu-kvm
2626
libguestfs-tools
2727

28-
# HACK molecule does not emit colored output with sudo
2928
- name: Allow any user to run libvirt
3029
run: sudo chmod o+rw /var/run/libvirt/libvirt-sock
3130

3231
- name: Install test runner
3332
run: python3 -m pip install tox
3433

35-
- name: Set and run tox environments
36-
# test every role in roles/ directory
34+
- name: Run test runner
3735
run: tox
38-
env:
39-
# force color output
40-
# https://www.jeffgeerling.com/blog/2020/getting-colorized-output-molecule-and-ansible-on-github-actions-ci
41-
ANSIBLE_FORCE_COLOR: 1

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description=Run default molecule scenario
66
skip_install = True
77
deps = --requirement=requirements.txt
88

9-
passenv = ANSIBLE_FORCE_COLOR
9+
setenv = ANSIBLE_FORCE_COLOR = 1
1010
allowlist_externals = molecule
1111

1212
commands =

0 commit comments

Comments
 (0)