0
有沒有試過使用Ansible(ansible 1.9.4)Netscaler模塊?我試圖使用它,但失敗,錯誤:Ansible netscaler模塊有錯誤「msg」:「'NoneType'對象沒有屬性'讀'」
ansible localhost -m netscaler -a "nsc_host=nsc.example.com user=nscuser password=nscpassword name=node1.example.com type=service action=disable validate_certs=False"
localhost | FAILED >> {
"failed": true,
"msg": "'NoneType' object has no attribute 'read'"
}
與-vvvv輸出:
<localhost> REMOTE_MODULE netscaler nsc_host=nsc.example.com user= nscuser password=VALUE_HIDDEN name=node1.example.com type=service action=disable validate_certs=False
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1460868653.22-66856743808206 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1460868653.22-66856743808206 && echo $HOME/.ansible/tmp/ansible-tmp-1460868653.22-66856743808206']
<localhost> PUT /tmp/tmpAfQPY2 TO /home/supp/.ansible/tmp/ansible-tmp-1460868653.22-66856743808206/netscaler
<localhost> EXEC ['/bin/sh', '-c', u'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/local/bin/python2.7 /home/supp/.ansible/tmp/ansible-tmp-1460868653.22- 66856743808206/netscaler; rm -rf /home/supp/.ansible/tmp/ansible-tmp- 1460868653.22-66856743808206/ >/dev/null 2>&1']
localhost | FAILED >> {
"failed": true,
"msg": "'NoneType' object has no attribute 'read'"
}
與不可用的1.9.5:
/usr/bin/ansible --version
ansible 1.9.5
configured module search path = None
/usr/bin/ansible localhost -m netscaler -a "nsc_host=nsc.example.com user= nscuser password=VALUE_HIDDEN name=node1.example.com type=service action=disable validate_certs=False" -vvvv
<localhost> REMOTE_MODULE netscaler nsc_host=nsc.example.com user= nscuser password=VALUE_HIDDEN name=node1.example.com type=service action=disable validate_certs=False
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1460873442.75-215681661318620 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1460873442.75-215681661318620 && echo $HOME/.ansible/tmp/ansible-tmp-1460873442.75-215681661318620']
<localhost> PUT /tmp/tmpiN_wRf TO /home/supp/.ansible/tmp/ansible-tmp-1460873442.75-215681661318620/netscaler
<localhost> EXEC ['/bin/sh', '-c', u'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python26 /home/supp/.ansible/tmp/ansible-tmp-1460873442.75-215681661318620/netscaler; rm -rf /home/supp/.ansible/tmp/ansible-tmp-1460873442.75-215681661318620/ >/dev/null 2>&1']
localhost | FAILED >> {
"failed": true,
"msg": "'NoneType' object has no attribute 'read'"
}
注:本地主機是不是NetScaler的,它是一個管理主機。
我也嘗試在劇本中使用模塊,但仍然失敗。
希望聽到你的建議。
謝謝。
什麼是輸出當您添加'-vvvv'? (編輯問題以包含輸出)。 – tedder42
@ tedder42,用-vvvv輸出已被添加到問題中,但我認爲它沒有幫助。 「本地主機」不是NETSCALER,只是一個管理主機。謝謝。 – SGM
你可以更新到1.9.5或1.9.6嗎?我對bug修復有預感。 – tedder42