简体   繁体   English

你如何强制Jenkins Ansible插件设置日志级别

[英]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. 当jenkins通过Ansible插件运行playbook时,我想将ansible playbook执行设置为verbose -vvv

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. 但是, https://github.com/jenkinsci/ansible-plugin似乎没有详细或日志级别作为其一部分,我没有看到任何其他方法将-vvv元素推送到命令行。

Is there a way to set log level in the playbook itself? 有没有办法在剧本本身设置日志级别?

To set Jenkins Ansible Plugin log level in Pipeline Script you can use extras parameter in ansiblePlaybook function to add command line arguments. 要在Pipeline Script中设置Jenkins Ansible Plugin日志级别,您可以在ansiblePlaybook函数中使用extras参数来添加命令行参数。 Example: 例:

node {
    ansiblePlaybook( 
        playbook: 'path/to/playbook.yml',
        extras: '-vvv' )
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM