[英]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.