goss icon indicating copy to clipboard operation
goss copied to clipboard

option reable for molecule test

Open spham opened this issue 4 years ago • 6 comments

hi today when have error, in molecule and ansible. we have report unreadable, like this.

image

why not have something like this ? image

it should improve debug and DX experience

spham avatar Nov 23 '21 18:11 spham

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 23 '22 01:01 stale[bot]

@spham when I use ansible I am unsatisfied with its default output too.

I tried a few options and then went with the YAML output option. https://www.jeffgeerling.com/blog/2018/use-ansibles-yaml-callback-plugin-better-cli-experience illustrates.

I thought that was a very acceptable experience for me. What do you think?

petemounce avatar Feb 14 '22 21:02 petemounce

thanks you

spham avatar Feb 15 '22 09:02 spham

when I try with ansible.cfg in same project

i have this issue, it request a password for tests

[defaults]
# Use the YAML callback plugin.
stdout_callback = yaml
# Use the stdout_callback when running ad-hoc commands.
bin_ansible_callbacks = True
failed: [] (item=/home/elk/roles/tests/templates/elastic.j2) => changed=false 
  ansible_loop_var: item
  item: /home/elk/roles/tests/templates/elastic.j2
  module_stderr: |-
    Shared connection to 172.25.192.122 closed.
  module_stdout: |-
    sudo: il est ncessaire de saisir un mot de passe
  msg: |-
    MODULE FAILURE
    See stdout/stderr for the exact error
  rc: 1

spham avatar Feb 28 '22 08:02 spham

That looks like the output format has changed to YAML as expected; is that correct?

The error seems to relate to either a dropped connection to that IP, or something in a language I don't know relating to sudo. Have you inspected the stdout/stderr as the error text suggests?

(I think we're into ansible playbook debugging here, not Goss...?)

petemounce avatar Feb 28 '22 09:02 petemounce

Sudo is trying to prompt for a password but cant without a tty, its a sudo setup issue imo

ripienaar avatar Feb 28 '22 09:02 ripienaar

Can this issue be closed?

berney avatar Jan 16 '23 01:01 berney

I think this is closeable. Please ping back if there's something further?

petemounce avatar Jan 17 '23 00:01 petemounce