Ansible changes the way you work. It helps shift from a world of manually executed tasks to automated and codified tasks. To do this you will incrementally build playbooks and will need to track changes in the files. You need source control for that.

Source control

Long gone are the days when you used shell histories and shared files to store your code. Source control lets you collaborate to store and audit your code.

Source control is a broad topic. Entire courses are dedicated to it. The good news is that you don’t need to understand the cavernous depths of source control. You just need enough information to become competent.

What is Git?

Git is a distributed source control system that:

  • enables you to work locally and independently.
  • supports collaboration, as you push your changes to the centralized server and pull changes contributed by your teammates to the codebase.

There are no more undo commands and v1 v2 files. You will no longer have to rely on those methods to track and roll back your code changes.

Git is a powerful tool as it provides a full historical audit of the codebase. On top of that, you can rollback.

You can use Git by either:

  • Cloning(copying) an existing repository.
  • Initializing a new repository.

The changes you make to the files are tracked using Git commands that allow you to:

  • add
  • commit
  • push

We will look at them in the next sections and lessons.

Create a GitHub account

Before you begin, you’ll have to create an account on GitHub. Do so by following these steps:

  1. Go to https://github.com/join
  2. Fill out the Create your account page with
    • Username
    • Email address
    • Password
  3. Complete the Verify your account puzzle
  4. Click Create Account

Once done, you are good to go. We will start by showing you how to create a Git Repository.

Creating and using a GitHub repository

Creating a repository in GitHub will initialize the repository and prepare it for use. We will be going through the process one step at a time.

Create a repository

Get hands-on with 1200+ tech skills courses.