Skip to content
This repository was archived by the owner on Apr 7, 2025. It is now read-only.
This repository was archived by the owner on Apr 7, 2025. It is now read-only.

Ansible command output is not logged #68

@gkranis

Description

@gkranis

When running kitchen the output of the ansible command is displayed on stdout.
However its missing from the kitchen logs.

So in our case .kitchen/logs/jenkins-ubuntu-1804.log contains

, [2023-02-23T17:31:12.888231 #430]  INFO -- jenkins-ubuntu-1804: *************** AnsiblePush run ***************
D, [2023-02-23T17:31:12.888364 #430] DEBUG -- jenkins-ubuntu-1804: env= <snipped blablabla> d --inventory-file=`which kitchen-ansible-inventory` --limit=kitchen test/integration/jenkins/ansible/default.yml
D, [2023-02-23T17:32:28.375982 #430] DEBUG -- jenkins-ubuntu-1804: ansible-playbook exit code = 0
I, [2023-02-23T17:32:28.376133 #430]  INFO -- jenkins-ubuntu-1804: *************** AnsiblePush end run *******************

This makes the plugin not an option for us as we rely on the logs (the standard output is unusable with --parallel)

From a quick look the output of the system call needs to be passed to a logging function.
So hopefully an easy fix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions