Write an Ansible playbook to configure a Linux server.
The goal of this project is to introduce you to the basics of configuration management using Ansible. You will write an Ansible playbook to configure a Linux server.
If you have been doing the previous projects, you should already have a Linux server running. If not, setup a Linux server on DigitalOcean, AWS or another cloud provider.
You are required to write an Ansible playbook called setup.yml
and create the following roles:
base
โ basic server setup (installs utilities, updates the server, installs fail2ban
, etc.)nginx
โ installs and configures nginx
app
โ uploads the given tarball of a static HTML website to the server and unzips it.ssh
- adds the given public key to the serverSet up the inventory file inventory.ini
to include the server you are going to configure When you run the playbook, it should run the roles above in sequence. You should also assign proper tags to the roles so that you can run only specific roles.
Example:
# Run all the roles
ansible-playbook setup.yml
# Run only the app role
ansible-playbook setup.yml --tags "app"
Modify the app
role to pull the repository from GitHub and deploy it.
Once you are done with the project, you should have a basic understanding of how Ansible works and how it can be used to manage server configuration.
Actively Maintained
We are always improving our content, adding new resources and adding features to enhance your learning experience.
Join the Community
roadmap.sh is the 7th most starred project on GitHub and is visited by hundreds of thousands of developers every month.
Roadmaps Best Practices Guides Videos FAQs YouTube
roadmap.sh by @kamrify @kamrify
Community created roadmaps, best practices, projects, articles, resources and journeys to help you choose your path and grow in your career.
Login to your account
You must be logged in to perform this action.