Debugging Ansible with Packer

2,095 views
Skip to first unread message

Nathan Sowatskey

unread,
Oct 19, 2015, 4:22:01 PM10/19/15
to ansible...@googlegroups.com
Hi

Does anyone know how to debug what Ansible is doing as part of a Packer build please?

Using packer -debug did not help.

In effect I need a way to introduce the -vvvvv argument to Ansible from within Packer, or to configure debug in a playbook.

Many thanks

Brian Coca

unread,
Oct 19, 2015, 4:57:47 PM10/19/15
to Ansible Project
If Packer is the one calling ansible, you might want to ask the Packer
crowd. Debug is not configurable from withing a playbook.

--
Brian Coca

Nathan Sowatskey

unread,
Oct 20, 2015, 1:03:12 AM10/20/15
to Ansible Project

{

      "type": "ansible-local",

      "playbook_file": "playbooks/setup_devvm.yml",

      "extra_arguments": "-vvvvv"

Jeremy Young

unread,
Oct 20, 2015, 8:41:27 AM10/20/15
to Ansible Project
This is definitely a Packer question, but you can increase verbosity of the playbook run by doing something like this:

{
      "type": "ansible-local",
      "playbook_dir": "/home/jyoung/git/ansible/playbooks",
      "staging_directory": "/opt/jeremydemo",
      "command": "ansible-playbook -vvvv",
      "playbook_file": "/home/jyoung/git/ansible/playbooks/packer_centos7_stig.yml"
Reply all
Reply to author
Forward
0 new messages