Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a playbook to create a backup of a file in the remote servers before copy.

Answer Posted / Ritesh Sinha

Here's a simple Ansible playbook to install Nginx on a host:nn- name: Install and configure Nginxn hosts: webserversn tasks:n - name: Install Nginxn apt: name=nginx state=presentn - name: Enable and start the servicen service: name=nginx enabled=yes started=yesn - name: Ensure nginx configuration is loadedn command: service nginx reload

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are ad-hoc commands? Give an example.

3


What is ci/cd?

3


What are playbooks in ansible?

2


How does ansible work?

3


How can one interpolate variables or dynamic variable names?

3


Why is ‘{{ }}’ notation used? And how can one interpolate variables or dynamic variable names?

2


Describe your newsletter ansible and who it’s aimed at.

3


When should you test playbooks and roles?

3


What is the method to check the inventory vars defined for the host?

4


Can you write a simple playbook to install nginx on a host machine?

3


How can looping be done over a list of hosts in a group, inside of a template?

3


Give a comparison between ansible and puppet.

3


What is ansible tower?

3


What are ansible server requirements?

4


Is it unsafe to bulk-set task arguments from a variable?

3