Day 58: Ansible Playbooks

Ansible playbooks
Ansible Playbooks provide a repeatable, reusable, simple configuration management and multimachine deployment system that is well suited to deploying complex applications. If you need to execute a task with Ansible more than once, you can write a playbook and put the playbook under source control. You can then use the playbook to push new configurations or confirm the configuration of remote systems.
Playbooks allow you to perform the following actions:
Declare configurations.
Orchestrate steps of any manual ordered process on multiple sets of machines in a defined order.
Launch tasks synchronously or asynchronously.
Task-01
Write an ansible playbook to create a file on a different server
Command : ansible-playbook create_file.yaml -i /etc/ansible/hosts —private-key=~/.ssh/ansible



Write an ansible playbook to create a new user.
Command : ansible-playbook create_user.yaml -i /etc/ansible/hosts —private-key=~/.ssh/ansible



Write an ansible playbook to install docker on a group of servers
Command : ansible-playbook install_docker.yaml -i /etc/ansible/hosts —private-key=~/.ssh/ansible









