Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/artcom/ansible-role-git-repo
Initializes a Git repository and optionally configures post-update and update hooks
https://github.com/artcom/ansible-role-git-repo
Last synced: about 1 month ago
JSON representation
Initializes a Git repository and optionally configures post-update and update hooks
- Host: GitHub
- URL: https://github.com/artcom/ansible-role-git-repo
- Owner: artcom
- License: mit
- Created: 2020-09-03T12:24:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-11T12:47:06.000Z (over 4 years ago)
- Last Synced: 2024-11-07T06:36:48.726Z (3 months ago)
- Language: HTML
- Size: 13.7 KB
- Stars: 0
- Watchers: 14
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Git Repo
Initializes a git repository and optionally configures post-update and update hooks. To use the hooks they must be present on the file system.## Requirements
None.## Role Variables
Available variables are listed below, along with default values `(see defaults/main.yml)`:
```yaml
git_repo_directory: null
git_repo_name: null
git_repo_owner: root
git_repo_group: root
git_repo_post_update_hook: null
git_repo_update_hook: null
git_server_restart_command: null
```
Required variables (role will fail if the variables are not set):
```yaml
git_repo_directory: "string"
git_repo_name: "string"
git_server_restart_command: "string"
```## Dependencies
None.# Example Playbook
```yaml
- name: Initialize git repo
hosts: all
become: true
roles:
- role: git-repo
vars:
git_repo_directory: /var/local/repos
git_repo_name: repo_name
git_repo_post_update_hook: /usr/local/bin/post-update-hook
git_repo_update_hook: /usr/local/bin/update-hook
git_server_restart_command: "systemctl restart git-server"
```## Test
### Requirements
- python >= 3.7
- docker### Run
```bash
pip install -r requirements.txt
molecule test --all
```## License
MIT