简体   繁体   English

在詹金斯中使用Ansible插件的问题

[英]Problem in using ansible plugin in jenkins

I installed Ansible plugin in Jenkins and I configured. 我在Jenkins中安装了Ansible插件,并进行了配置。 I created ansible.cfg, hosts and the playbook files. 我创建了ansible.cfg,主机和剧本文件。 I pushed those files with directory in Bitbucket. 我将这些文件与Bitbucket中的目录一起推送。 The issue is when I start a build in Jenkins it says "skipping: no hosts matched" or I have already tested the directory manually and it works. 问题是,当我在Jenkins中启动构建时,它说“正在跳过:没有主机匹配”,或者我已经手动测试了该目录并且可以工作。

This is jenkins configuration: 这是詹金斯的配置: 在此处输入图片说明

This the error message: 这是错误信息:

在此处输入图片说明

When i execute the ansible-playbook command directly from the folder in Desktop it works. 当我直接从Desktop中的文件夹执行ansible-playbook命令时,它将起作用。

在此处输入图片说明

This is when i executed the command in the jenkins directory 这是我在jenkins目录中执行命令时

在此处输入图片说明

I think you need to provide a credentials owner. 我认为您需要提供凭据所有者。 When you run it manually you are identified (with an attached ssh key) but Jenkins needs some permissions. 当您手动运行它时,将被标识(带有附加的ssh密钥),但Jenkins需要一些权限。

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

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