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.
We will use the same minion and state directory as the previous recipe:
/opt/salt-cookbook/staging/apache/git_repo.slsfile 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 ...