O'Reilly logo

Salt Cookbook by Anirban Saha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing code repositories with Git

In modern dynamic environments, usage of code repositories is considered vital for efficient code management, collaboration, and practices such as Continuous Integration. Fortunately, Salt makes it easy enough to manage code repositories using its modules. In this recipe, you will learn how to manage code repositories using Git.

How to do it...

We will use the same minion and state directory as the previous recipe:

  1. Create and edit the /opt/salt-cookbook/staging/apache/git_repo.sls file to have the following entries:
    git: pkg: - installed user: - present - home: /home/git /opt/apache-repo: file.directory: - user: git - group: git - dir_mode: 0755 - require: - user: git /home/git/.ssh: file.directory: - user: git ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required