Professional Documents
Culture Documents
Savitha
DevOps 5l3321LO;o 39
Assigonent - 2
Anstble Moduuler
Ansible modles ae used to pefom VaDçous tusts
7enOte hots. thee basicay nall, s tasalone,
Soits thO t cnsible wse tt com uniate woith the
1emote hasts in orde to exeite Specfic actiors.
the moles Can be e e cubed from the
(ine o an be ontten in the plauybooks
Synta fo Loitirg the modile on (ommand line
wbile
wstg the moule wAe tbe option
Such as - m and -CL. the -n SfoT mdte and a s for
aument,ftei he -a oFtio we Spectty he exectuable
Command in doule quDtes.
useb hort I
Cdevj
|92.(681.01
|92.1b&|.O2
(92. lb&.1. |
192. lb8IR
Comnent line
Name d playbook
Tasrs
|mecules)
thae e dases
Lroai. yn)
+Readme md
4ta
’templates ymain.ym)
4(nventomy
yteSt testyol
VOrs
de foults - It Stores 4he defoult vaojable for the role
files - This folde cOntains the les eaiyed to trarsfer
deploy to the taiget
machines
Lsed by
" bandles - t cootuins bandles, wbich may be
SONe Aole.
data or informatien about tho ola
metta - t deAne .come
t toss to be ezeutet
" tas ks -(t ontains he main list
defioed in sepaNate Gtes
by the ole. these tasts nlght be
functionalities
cs per the
the templates wshich ca be
" templates - It cotains
deployed via a role.
ansible
Adhoc comtandc in
ae cL CcomDand Line
+ The ansible adhoc ommasds
s
Commands sed for siPle and one irne such
In tece)
hosts at a time or transfeig some
Shutting dous all he
nodes.
ile to all the
eas but they
The adhoc coMMads a e qick and
e Dot eUsable.
ae Lsed n ansIble to pef
Te adboc Comands
Immediate banie
or openrtion that a e neecded o
toxh
equisements.
as pe the
coands
Syntaz for adhoe
Ne 2hosts 7[-m Lmocule_name ]-a L"a1guments">
-u LLsenname -- beormeT
. To test the nec tion betoeen Corrto|Node and all the
mabaged nodes
$ ansible dev -m ping
2. TO check the list G a) 4he hosts
basts
S. TO get the physical memory allocated to the
$ ansTble dev -m shell -a cat lpYDC lead -2"