Dab tsi yog hosts hauv Ansible?
Dab tsi yog hosts hauv Ansible?

Video: Dab tsi yog hosts hauv Ansible?

Video: Dab tsi yog hosts hauv Ansible?
Video: Yuav poj ntau hais tsis tau ces dhia tsua tuag (Dab) 6/25/2020 2024, Kaum ib hlis
Anonim

A tus tswv cov ntaub ntawv muaj tus tswv tsev pab pawg thiab tus tswv nyob rau hauv cov pab pawg. Ib qho super-set ntawm tus tswv tuaj yeem tsim los ntawm lwm tus tus tswv tsev pab pawg siv cov: cov neeg ua haujlwm me nyuam. Hauv qab no yog ib qho piv txwv ntawm ib qho yooj yim heev Tus tswv tsev ntaub ntawv.

Ib yam li ntawd, Ansible hosts file nyob qhov twg?

Cov Cov ntaub ntawv khaws cia txhais cov tus tswv thiab pab pawg ntawm tus tswv raws li cov lus txib, modules, thiab cov dej num hauv a phau ntawv ua si ua haujlwm. Cov ntaub ntawv tuaj yeem ua ib qho ntawm ntau hom nyob ntawm koj Ansible ib puag ncig thiab plugins. Lub default chaw rau lub cov ntaub ntawv khaws tseg yog /etc/ ansible / tus tswv.

Tsis tas li ntawd, hom khoom muag hauv Ansible yog dab tsi? Hauv Ansible , muaj ob hom khoom muag cov ntaub ntawv: Static thiab Dynamic. Cia peb saib txhua tus ntawm no thiab saib seb peb yuav tswj tau li cas. Txog tam sim no, peb xav tias koj twb tau teeb tsa Ansible ntawm koj qhov Control node, thiab teeb tsa Passwordless SSH kev twb kev txuas rau koj tus tswv tswj hwm.

Ib yam li ntawd, dab tsi yog txoj kev sib txawv uas tsis yog SSH los ntawm Ansible tuaj yeem txuas rau cov chaw taws teeb tswj hwm?

Los ntawm lub neej ntawd, Ansible nkoj nrog ob peb plugins. Feem ntau siv yog paramiko SSH , haiv neeg ssh (tsuas yog hu ua ssh ), thiab hauv zos hom kev sib txuas . Tag nrho cov no ua tau siv rau hauv phau ntawv ua si thiab nrog /usr/bin/ ansible txiav txim siab seb koj xav tham nrog nyob deb tshuab.

Remote_user hauv Ansible yog dab tsi?

Cov remote_user tsuas yog lub npe ntawm tus neeg siv tus account: --- - hosts: webservers remote_user :root. Nco tseg. Cov remote_user parameter yog yav tas los hu ua tus neeg siv xwb. Nws tau renamed nyob rau hauv Ansible 1.4 kom nws paub qhov txawv ntawm cov neeg siv module (siv los tsim cov neeg siv ntawm cov chaw taws teeb).

Pom zoo: