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

Only see stdout on Errors #187

Closed
shanep2300 opened this issue May 6, 2024 · 1 comment
Closed

Only see stdout on Errors #187

shanep2300 opened this issue May 6, 2024 · 1 comment
Labels

Comments

@shanep2300
Copy link

Hello,

Running Packer through Jenkins (not sure if this is a Jenkins issue or Packer/Ansible config).

Jenkins console will get to the packer build step, print that line, and then I get nothing until the ansible scripts either completes or throws an error. If it's successful, I don't see any of the ansible output. But if there is an error I see the normal ansible output up until the error in one fell swoop.

I would like to see the ansible steps being printed out in the Jenkins console ouput as they're happening.

ansible.cfg

[defaults]
stdout_callback = yaml

main.pkr.hcl

provisioner "ansible" {
    ansible_env_vars = ["ANSIBLE_CONFIG=ansible.cfg"]
    extra_arguments  = ["--extra-vars", "ansible_winrm_server_cert_validation=ignore"]
    playbook_file    = "win-base-custom-harden.yml"
    use_proxy        = false
    user             = "g-admin"
  }
@lbajolet-hashicorp
Copy link
Contributor

Hi @shanep2300,

Not sure how we can help, but you should try running your build with verbose logs (set the PACKER_LOG=1 environment variable for that) for more debugging information, this may point you to the source of the problem.

That said, this doesn't appear to be a bug or a feature request, and issues like those are mostly what that repo's for. For general usage questions I would suggest using our discuss forum for that, as the community may be able to help with your question/problem.

I'll close this issue now, but please feel free to reopen if you think I've been too quick to jump the gun here.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants