Modules in Playbook

bootstrap themes
Mobirise

Using modules in Playbooks.

Create a play book hostname putting into the file , its more interesting in this
Lets create playbook , addline-infile.yml file ,
[ansible@ansible1 ~]$ vi addline-infile.yml
I have used hosts as database server , I have used module add line in file ,
I have created two task ,
• One is if file is not found in that directory to create that
• Second is line to add HOSTNAME in that file
Lets run the playbook ,

[ansible@ansible1 ~]$ ansible-playbook addline-infile.yml
Playbook run exactly !!!
Go to target server to check that file found or not ,
File has been created and line has been added hostname correctly !!!!

CONTACT US

Address

No. 209/210, 1st Floor
J.Nagar, Panaiyur Kuppam Road
(Beside MGR Statue)
Panaiyur
Chennai -600119 




Contacts
Email:   admin@zippyops.com
Phone: +91 7010585768
              +91 8903067727