Debugging Ansible with Packer

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

Nathan

Nathan John Sowatskey
Programmable Infrastructure, DevOps and SDN
nathan@nathan.to

https://es.linkedin.com/in/nathansowatskey
XMPP: nathandotto@im.koderoot.net
Google: nathanjohnsowatskey@gmail.com
Skype: nathan_sowatskey
Twitter: NathanDotTo

http://www.kipling.org.uk/poems_if.htm

If Packer is the one calling ansible, you might want to ask the Packer
crowd. Debug is not configurable from withing a playbook.

{

“type”: “ansible-local”,

“playbook_file”: “playbooks/setup_devvm.yml”,

“extra_arguments”: “-vvvvv”

}

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”
}