2016-11-04 9 views
2

私は不可能なアーカイブモジュールを使いたいのですが、残念ながら動作しません。私は、次のバージョンがインストールされている:ansible 2.3.0を(のdevel 2131eaba0c)可能なアーカイブモジュール「タスクでアクションが検出されません」

私の脚本は、次のようになります限り

"failed": true, "reason": "no action detected in task. This often indicates a misspelled module name, or incorrect module path. 
The error appears to have been in '/prj/sndbox1/app/jenkins/jobs/release/workspace/tasks/build_rpclient.yml': line 125, column 3, but may be elsewhere in the file depending on the exact syntax problem. 
The offending line appears to be: 

- archive: path="{{path_dir}}" dest="{{dest_dir}}/foo.zip" format=zip 
^here 
We could be wrong, but this one looks like it might be an issue with missing quotes. Always quote template expression brackets when they start a value. For instance: 
    with_items: 
    - {{ foo }} 
Should be written as: 
    with_items: 
    - "{{ foo }}" 

:出力は次のようになります

- archive: path="{{path_dir}}" dest="{{dest_dir}}/foo.zip" format=zip 

私はdocを理解しました。余分なモジュールは安全の範囲内で出荷されていますので、私はこのモジュールを別途インストールする必要はないと思います。

しかし、私は間違っていますか?余分なモジュールを探す場所を教えるために変更が必要な設定はありますか?

ありがとうございます!

編集:含ま2フルログメッセージ

編集:私は私の作業ディレクトリに直接archive.pyを入れてみました

- > [ライブラリ] /archive.py私は肝炎

"failed": true, "msg": "Could not find imported module support code for archive. Looked for either get_exception or pycompat24" 
+0

それは完全なプレイブックですか?完全なエラーメッセージとは何ですか? –

+0

完全なログメッセージを挿入しました。プレイブックには他のタスクも含まれていますが、この作業がなければ動作しますので、残りの部分は正常に動作するはずです。 – Vetemi

+0

テストをしましたが、アーカイブは2.1.2.0でも安全ではなくなりました。私は私のエクストラモジュールをチェックして、それを見ませんでした。あなたは不可解なgit repoからそれをつかんで、必要に応じてあなたの演劇/役に置く必要があります。 –

答えて

0

は今、私は次のエラーを取得します同じユースケースをここで使用しています。有益バージョン2.2.0.0です。 MacOS sierraにbrew経由でインストールされます。

私はローカルansible.cfgファイルに以下を追加して問題を解決しました。

defautls部に

、あなたはライブラリのエントリを変更する必要があります。

[defaults] library = /usr/local/Cellar/ansible/2.2.0.0_2/libexec/lib/python2.7:library

あなたが別のセットアップを持っている場合は、チェック:

  1. pip show ansible
  2. /usr/share/ansibleを使用すると、Linuxマシン上にある場合。
関連する問題