Configuration Management

Write an Ansible playbook to configure a Linux server.

Start building, submit solution and get feedback from the community.
2Submit Solutionยท
5 upvotes10 upvotes

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.

Requirements

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 server

Set 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"

Stretch goal

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.

Found a mistake? Help us improve.

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.

Rank 7th  out of 28M!

298K

GitHub Stars

Star us on GitHub
Help us reach #1

+90k every month

+1M

Registered Users

Register yourself
Commit to your growth

+1.5k every month

29K

Discord Members

Join on Discord
Join the community

Roadmaps Best Practices Guides Videos FAQs YouTube

roadmap.sh by @kamrify

Community created roadmaps, best practices, projects, articles, resources and journeys to help you choose your path and grow in your career.

© roadmap.sh · Terms · Privacy · Advertise ·

ThewNewStack

The top DevOps resource for Kubernetes, cloud-native computing, and large-scale development and deployment.