question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ansible output is not displayed

See original GitHub issue

Issue Type

  • Bug report

Molecule and Ansible details

ansible [core 2.11.4]
  config file = None
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/user/.virtualenvs/mol/lib/python3.7/site-packages/ansible
  ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/user/.virtualenvs/mol/bin/ansible
  python version = 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]
  jinja version = 3.0.1
  libyaml = True
molecule 3.4.0 using python 3.7
    ansible:2.11.4
    delegated:3.4.0 from molecule

Molecule installation method:

  • pip

Ansible installation method:

  • pip

Detail any linters or test runners used:

Desired Behavior

When runing a molecule command, the ansible output gets displayed

Actual Behaviour

When running a molecule command, all the molecule output is displayed but not the ansible-playbook output (i.e “PLAY … TASK…”).

To reproduce the issue, I used this simple script named test.sh in my test directory:

#!/bin/bash
VERSION=${1:-HEAD}
if [ "$VERSION" == "HEAD" ];then
  pip install molecule ansible
else
  pip install molecule==3.1.5 ansible==2.9.25
fi
ansible --version && molecule --version
rm -rf myrole
molecule init role myrole
cd myrole || return
molecule --debug destroy
  • I created a virtualenv and ran ./test.sh to install last version of molecule and ansible and execute a molecule destroy and got no ansible output
  • I created another virtualenv and ran ./test.sh 1 to install version 3.1.5 of molecule and version 2.9.25 of ansible and this time got the expected ansible

I posted the complete output here

I used the molecule destroy command as it is the easiest reproducible example but I experience the same issue with molecule converge or molecule test.

I tried on debian buster (python 3.7) and ubuntu focal (python 3.8)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
ssbarneacommented, Sep 7, 2021

I think i found the bug, try to add subprocess-tee!=0.3.3 and tell me if it is fixing your problem, if confirmed I will yank that release made yesterday and look for a fix for it.

1reaction
ssbarneacommented, Sep 7, 2021

I just yanked the 0.3.3 release and created https://github.com/pycontribs/subprocess-tee/issues/46 for tracking. Rerunning CI jobs should be enough. For local, you may want to recreate the virtualenvs to remove the rotten apple.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ansible: how to get output to display [duplicate] - Stack Overflow
Every Ansible task when run can save its results into a variable. To do this, you have to specify which variable to save...
Read more >
How to print command output in Ansible? - Linux Hint
How to print command output in Ansible is explained in this article. ... will run just fine; however, the output will not be...
Read more >
How to see stdout of ansible commands? - Server Fault
Make sure the command you're running has a timeout, or use the ansible async to force a timeout. Then you should be prompted...
Read more >
Job output is not displayed fully · Issue #11765 · ansible/awx
I understand that AWX is open source software provided for free and that I might not receive a timely response.
Read more >
Logging Ansible output
Logging Ansible output . By default Ansible sends output about plays, tasks, and module arguments to your screen (STDOUT) on the control node....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found