summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/cgit/files/cgitrepos6
-rw-r--r--roles/cgit/tasks/main.yml2
-rw-r--r--roles/cgit/templates/cgitrepos8
3 files changed, 9 insertions, 7 deletions
diff --git a/roles/cgit/files/cgitrepos b/roles/cgit/files/cgitrepos
deleted file mode 100644
index 72089e3..0000000
--- a/roles/cgit/files/cgitrepos
+++ /dev/null
@@ -1,6 +0,0 @@
-repo.url=ansible
-repo.path=/srv/git_repos/public
-repo.desc=Ansible configuration for the server
-repo.owner=mscherer@redhat.com
-#repo.readme=info/web/about.html
-
diff --git a/roles/cgit/tasks/main.yml b/roles/cgit/tasks/main.yml
index 065f237..f6ac30a 100644
--- a/roles/cgit/tasks/main.yml
+++ b/roles/cgit/tasks/main.yml
@@ -5,7 +5,7 @@
- lineinfile: dest=/etc/cgitrc line=include=/etc/cgitrepos
-- copy: mode=0644 src=cgitrepos dest=/etc/cgitrepos
+- template: mode=0644 src=cgitrepos dest=/etc/cgitrepos
- copy: mode=0644 src=cgit.httpd.conf dest=/etc/httpd/conf.d/cgit.conf
notify: restart httpd
diff --git a/roles/cgit/templates/cgitrepos b/roles/cgit/templates/cgitrepos
new file mode 100644
index 0000000..e5b2cd6
--- /dev/null
+++ b/roles/cgit/templates/cgitrepos
@@ -0,0 +1,8 @@
+{% if git_repositories is defined %}
+{% for repo in git_repositories %}
+repo.url={{ repo.name }}
+repo.path={{ repo.path }}
+repo.desc={{ repo.desc }}
+repo.owner={{ repo.owner }}
+{% endfor %}
+{% endif %}