[英]Unable to run openstack client from Jenkins
我创建了Ansible剧本,以在openstack云中创建新图像。 我正在运行詹金斯写的这本剧本。 从詹金斯(Jenkins)运行时,出现以下错误。
TASK [Create image from Instance]
********************************************** fatal:
[localhost -localhost]: FAILED! ={"changed": true, "cmd":
"/bin/openstack --insecure server image create --name abhay_suse_demo_img Abhay_Suse_Demo",
"delta": "0:00:00.542002", "end": "2018-03-26 07:07:44.377724",
"msg": "non-zero return code", "rc": 1, "start": "2018-03-26 07:07:43.835722",
"stderr": "'module' object has no attribute 'OpenStackConfigException'",
"stderr_lines": ["'module' object has no attribute 'OpenStackConfigException'"],
"stdout": "", "stdout_lines": []}
to retry, use: --limit @/tmp/imageCreate_Fe.retry
- hosts: localhost
tasks:
- name: Shutdown the instance
os_server_action: action=stop server={{ server }} timeout=200 verify=no
delegate_to: localhost
ignore_errors: Yes
- name: Create image from Instance
shell: /bin/openstack --insecure server image create --name {{ snapshot_image }} {{ server }}
delegate_to: localhost
我已经导出了环境变量以进行身份验证。
是因为jenkins以jenkins用户身份运行命令吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.