0
Im在Ubuntu 16.04上運行Ansible 2.0.0.2。我的劇本在1.9版本上運行良好,但在劇本運行結束時出現以下錯誤。ansible 2.0.0.2 - shutil.rmtree錯誤,但劇本成功
PLAY RECAP
*********************************************************************
localhost : ok=62 changed=13 unreachable=0 failed=0
clientnode.com : ok=12 changed=3 unreachable=0 failed=0
Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 124, in <module>
shutil.rmtree(C.DEFAULT_LOCAL_TMP, True)
AttributeError: 'module' object has no attribute 'DEFAULT_LOCAL_TMP'
Build step 'Execute shell' marked build as failure
所以劇本是成功的,但詹金斯的工作失敗,因爲這個python錯誤。 我該如何解決
好像你的Ansible軟件包有衝突或者安裝破壞:Ansible 2的'/ usr/bin/ansible -...'腳本,Ansible 1.9的python軟件包。 –
謝謝。 我怎樣才能使蟒蛇版本相同? 我運行/ usr/bin/ansible --version並得到相同的錯誤。 – GergA
不是「python版本」,而是「ansible python package version」。這取決於你是如何安裝它的。我建議刪除所有現有的Ansible安裝並通過'pip'安裝它。 –