Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible-runner: stdout and stderr files are empty after the run. #1400

Closed
siva-vaddipati opened this issue Oct 29, 2024 · 0 comments
Closed
Labels
needs_triage New item that needs to be triaged

Comments

@siva-vaddipati
Copy link

Hi,

I am running the ansible playbooks using ansible-runner in a container.
I'm using the below command to run the playbook,

`ansible_runner.run_command(
        executable_cmd='ansible-playbook',
        cmdline_args=['/pbs/playbook.yaml', '--tags', task, '--extra-vars', extra_vars, '-vvvv']
        status_handler=ansible_status_handler,
        envvars=envvars,
        runner_mode='subprocess',
        artifact_dir='/artifacts',
        ident=ident,
        timeout=timeout,
        output_fd=sys.stdout,
        error_fd=sys.stderr,
    )`

In my playbook I am also referring to my ansible.cfg, which has
#stdout_callback = awx_display commented out. I have also tested by uncommenting this line but the result remains the same.

once the play starts running, I am also seeing the below logs on the pod,

`Skipping callback 'awx_display', as we already have a stdout callback.
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
`

Once the run completes, I observed that the stdout and stderr files in /artifcats/{runner_id} are created but they do not have any content. However, the job_events directory has *-partial.json files. I am able to see the all the ansible logs on the terminal of the pod, but the stdout file is just empty after the run.
Please let me know if I need to configure anything else.

Thanks in advance.

@github-actions github-actions bot added the needs_triage New item that needs to be triaged label Oct 29, 2024
@siva-vaddipati siva-vaddipati closed this as not planned Won't fix, can't repro, duplicate, stale Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_triage New item that needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant