Cov txheej txheem:

Dab tsi yog Ansible modules?
Dab tsi yog Ansible modules?

Video: Dab tsi yog Ansible modules?

Video: Dab tsi yog Ansible modules?
Video: Triste última hora de Karlos Arguiñano 2024, Kaum ib hlis
Anonim

Cov qauv (tseem hu ua "task plugins" lossis "library plugins") yog cov lej sib cais uas tuaj yeem siv los ntawm kab hais kom ua lossis hauv phau ntawv ua haujlwm. Ansible executes txhua module , feem ntau ntawm lub hom phiaj tej thaj chaw deb, thiab sau cov nqi rov qab. Txhua module txhawb nqa kev sib cav.

Yog li ntawd, muaj pes tsawg tus Ansible modules muaj?

LUB SIJ HAWM: SIV TSEEM CEEB RAU AD HOC PARALLEL TASK EXECUTION Ansible muaj ib tug loj heev toolbox ntawm built- hauv modules , zoo tshaj 750 ntawm lawv.

Tsis tas li ntawd, peb lub hauv paus modules yog dab tsi rau Ansible? Modules tuav los ntawm Ansible Core Team

  • acl - Teem thiab khaws cov ntaub ntawv ACL cov ntaub ntawv.
  • add_host - ntxiv ib tus tswv tsev (thiab lwm pab pawg) rau ansible-playbook hauv-nco cov lus nug.
  • apt - Tswj apt-packages.
  • apt_key - Ntxiv lossis tshem tawm tus yuam sij apt.
  • apt_repository - Ntxiv thiab tshem tawm APT repositories.
  • assemble - Sib sau ua ke cov ntaub ntawv configuration los ntawm fragments.

Yog li ntawd, kuv yuav sau Ansible modules li cas?

Tsim ib tug tshiab module:

  1. Nkag mus rau cov npe raug rau koj qhov module tshiab: $ cd lib/ansible/modules/cloud/azure/
  2. Tsim koj cov ntaub ntawv tshiab module: $ kov my_test.py.
  3. Muab cov ntsiab lus hauv qab no tso rau hauv koj cov ntaub ntawv module tshiab.
  4. Hloov kho thiab txuas ntxiv cov cai los ua qhov koj xav kom koj tus qauv tshiab ua.

Ansible ua si yog dab tsi?

Ib Ib phau ntawv ua si yog ib chav tsev ntawm cov ntawv sau uas txhais tau tias ua haujlwm rau lub server configuration tswj los ntawm cov cuab yeej automation Ansible . Ansible yog ib tug configuration tswj cuab tam uas automates configuration ntawm ntau servers los ntawm kev siv Ansible phau ntawv ua si. Ansible ua si tau sau rau hauv YAML.

Pom zoo: