0
私が追加したモジュールをピックアップしているAnsibleに問題があります。カスタムモジュールをピックアップできない可能性
- このモジュールは、「passwordstore」https://github.com/morphje/ansible_pass_lookup/と呼ばれます。
- 私はAnsibleを使用しています。2.2
- 私のプレイブックでは、「ライブラリ」フォルダを追加し、そのGitHubディレクトリの内容をそのフォルダに追加しました。私も
library = /usr/share/ansible/modules
のコメントを外してみましたが、そこにモジュールファイルを追加してもまだ取り上げられません。 - も私のAnsible脚本はこのようになります
ANSIBLE_LIBRARY=/usr/share/ansible/modules
に環境変数を設定しようとしたことがあり:
---
- name: example play
hosts: all
gather_facts: false
tasks:
- name: set password
debug: msg="{{ lookup('passwordstore', 'files/test create=true')}}"
そして、私はこれを実行すると、私はこのエラーを取得します。
ansible-脚本main.yml
PLAY [example play] ******************************************************
TASK [set password] ************************************************************
fatal: [backend.example.name]: FAILED! => {"failed": true, "msg": "lookup plugin (passwordstore) not found"}
fatal: [mastery.example.name]: FAILED! => {"failed": true, "msg": "lookup plugin (passwordstore) not found"}
to retry, use: --limit @/etc/ansible/roles/test-role/main.retry
私が欠けているものを上の任意の指導?それはちょうど私がカスタムモジュールを追加しようとしている方法かもしれませんが、どんな指針も認められます。