blob: 57522293ed6e4dbb78aacc0fe319357f63249d0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
cgit
====
Description
-----------
The `cgit` role installs and configures [cgit](https://git.zx2c4.com/cgit/about/),
a web frontend for Git. It does _not_ configure a webserver.
Variables
---------
This role **accepts** the following variables:
Variable | Default | Description
-------------------------|------------------------------------------------------------------|------------
`cgit_clone_prefixes` | `['https://{{ ansible_fqdn }}', 'ssh://git@{{ ansible_fqdn }}']` | Clone URLs to show on repository pages
`cgit_title` | `{{ organization }} Git Repository` | Title shown on index page
`cgit_description` | `Source code for various {{ organization }} projects` | Subtitle shown on index page
`cgit_cache_size` | 1000 | Number of pages to cache
`cgit_project_list` | `/var/www/git/projects.list` | Path to repository list
`cgit_scan_path` | `/var/www/git/repositories` | Path containing Git repositories
`cgit_enable_http_clone` | no | Let cgit handle clones over HTTP
`cgit_repository_sort` | `name` | Sort repositories by either `name` or `age`
`cgit_branch_sort` | `name` | Sort branches by either `name` or `age`
`cgit_about_html` | see [default vars](defaults/main.yml) | HTML to include in About page
`cgit_favicon` | | Path to custom favicon image
`cgit_logo` | | Path to custom logo image (ideally 96x64)
`cgit_css` | | Path to custom CSS file
`cgit_head_include` | | Path to custom HTML `<head>` include
`cgit_header` | | Path to custom HTML header
This role **exports** the following variables:
Variable | Description
------------------|------------
`cgit_static_dir` | Path to static assets
`cgit_cgi_script` | Path to CGI binary
Usage
-----
Example playbook:
````yaml
- name: configure git repository
hosts: git_servers
roles:
- role: cgit
tags: cgit,git
vars:
cgit_clone_prefixes:
- https://git.example.com
cgit_title: Example Org Git Repository
cgit_logo: ~/Pictures/cgit_logo.png
cgit_favicon: ~/Pictures/cgit_favicon.ico
````
|