0
我有問題Ansible拿起我添加的模塊。Ansible沒有拿起自定義模塊
- 該模塊被稱爲'passwordstore'https://github.com/morphje/ansible_pass_lookup/。
- 我正在使用Ansible 2.2
- 在我的手冊中,我添加了一個'庫'文件夾,並將該GitHub目錄的內容添加到該文件夾中。我也嘗試去除註釋
library = /usr/share/ansible/modules
,並在那裏添加模塊文件,但仍然沒有拿起。 - 也試過環境變量設置爲
ANSIBLE_LIBRARY=/usr/share/ansible/modules
我Ansible劇本是這樣的:
---
- 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
對我失去了我的任何指導?這可能只是我試圖添加自定義模塊的方式,但任何指導都將不勝感激。