Ansible Plugins
Modules (also referred to as “task plugins” or “library plugins”) are discrete units of code that can be used from the command line or in a playbook task. Ansible executes each module, usually on the remote target node, and collects return values.
- Ansible Plugins Guide链接access.redhat.com/articles/3642632?extIdCarryOver=true&sc_cid=701f2000001OH6uAAGInventory Plugins · Kubernetes Inventory · Script Inventory · Tower Inventory · Modules (also referred to as “task plugins” or “library plugins”) are discrete units of code that...笔记:Ansible Plugins
Lookup
- lookup plugin
- 常用 - 所有
ansible-doc -t lookup -lenvfilepassword- 生成密码到文件consul_kvhashi_vault- vault 中的数据 - 需要 hvacdigdnstxtfileglobfirst_foundconfig- 配置项ansible-config listk8svarsvarnamesdict
ansible -m debug -a "msg={{lookup('env','HOME')}}" localhost
ansible -m debug -a "msg={{lookup('file',lookup('env','HOME')+'/.ssh/id_rsa.pub')}}" localhost- name: access env
debug: msg={{lookup('env','HOME')}}
- name: access file
debug: msg={{lookup('file',lookup('env','HOME')+'/.ssh/id_rsa.pub')}}关联信息
反向链接、本文链接的其他页面和外部资料。
参考资料
其他外链6 条
- access.redhat.com/articles/3642632?extIdCarryOver=true&sc_cid=701f2000001OH6uAAGaccess.redhat.com/articles/3642632?extIdCarryOver=true&sc_cid=701f2000001OH6uAAG
- docs.ansible.com/ansible/latest/plugins/inventory.htmldocs.ansible.com/ansible/latest/plugins/inventory.html
- docs.ansible.com/ansible/latest/plugins/inventory/k8s.htmldocs.ansible.com/ansible/latest/plugins/inventory/k8s.html
- docs.ansible.com/ansible/latest/plugins/inventory/script.htmldocs.ansible.com/ansible/latest/plugins/inventory/script.html
- docs.ansible.com/ansible/latest/plugins/inventory/tower.htmldocs.ansible.com/ansible/latest/plugins/inventory/tower.html
- docs.ansible.com/ansible/latest/plugins/lookup.htmldocs.ansible.com/ansible/latest/plugins/lookup.html