Ansible modules khaws cia nyob qhov twg?

Cov txheej txheem:

Ansible modules khaws cia nyob qhov twg?
Ansible modules khaws cia nyob qhov twg?

Video: Ansible modules khaws cia nyob qhov twg?

Video: Ansible modules khaws cia nyob qhov twg?
Video: Ansible Best Practices Roles and Modules 2024, Hlis ntuj nqeg
Anonim

~/. ansible/plugins/modules/ /usr/share/ansible/plugins/modules/

Ansible python modules nyob qhov twg?

Los ntawm lub neej ntawd, Ansible xav tias nws tuaj yeem pom /usr/bin/python ntawm koj qhov chaw taws teeb uas yog Python2, version 2.6 lossis siab dua lossis Python3, 3.5 lossis siab dua.

Kuv yuav paub li cas yog tias Ansible modules raug teeb tsa?

Ansible muaj cov lus txib ntxim nyiam heev hu ua ansible-doc. Cov lus txib no yuav qhia tag nrho cov ntsiab lus module tau teeb tsa hauv koj lub cev.

Kuv yuav muab kev cai Ansible modules nyob qhov twg?

Yog li, yuav ua li cas ntxiv kev cai modules ?

  1. ~/.ansible/plugins/modules/
  2. /usr/share/ansible/plugins/modules/
  3. ib phau ntawv hauv ANSIBLE_LIBRARY ib puag ncig hloov pauv.

Kuv yuav sau npe Ansible modules li cas?

Koj tuaj yeem ua cov qauv los ntawm kab hais kom ua:

  1. ansible webservers -m kev pabcuam -a "name=httpd xeev=pib" ansible webservers -m ping ansible webservers -m hais kom ua -a "/sbin/reboot -t tam sim no"
  2. - lub npe: reboot lub servers hais kom ua: /sbin/reboot -t tam sim no.
  3. - lub npe: rov pib qhov kev pabcuam webserver: npe: httpd xeev: rov pib dua.

Pom zoo: