Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you force Jenkins Ansible Plugin to set log level

I want to set ansible playbook execution to verbose -vvv when jenkins runs the playbook via the Ansible Plugin.

However, https://github.com/jenkinsci/ansible-plugin doesn't appear to have a verbose or log level as a part of it and I don't see any other way to push the -vvv element on to command line.

Is there a way to set log level in the playbook itself?

like image 271
Peter Kahn Avatar asked Apr 24 '17 17:04

Peter Kahn


1 Answers

To set Jenkins Ansible Plugin log level in Pipeline Script you can use extras parameter in ansiblePlaybook function to add command line arguments. Example:

node {
    ansiblePlaybook( 
        playbook: 'path/to/playbook.yml',
        extras: '-vvv' )
}
like image 68
Travenin Avatar answered Oct 08 '22 12:10

Travenin