Skip to content
Snippets Groups Projects
Commit 88e44130 authored by nimrod's avatar nimrod
Browse files

Add ansible-galaxy init style structure.

parent dae91aeb
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,35 @@ Ansible-cgit ...@@ -2,6 +2,35 @@ Ansible-cgit
============ ============
Ansible role for creating a git-readonly web site with cgit. Ansible role for creating a git-readonly web site with cgit.
Also, a Fabric task for creating new repositories, like so: ::
fab new_repo:name_of_repo -H cgit.example.com Requirements
------------
Debian Jessie.
Role Variables
--------------
None.
Dependencies
------------
None.
Example Playbook
----------------
- hosts: servers
roles:
- ansible-cgit
License
-------
MIT
Author Information
------------------
Repository is located at: https://www.shore.co.il/cgit/ansible-cgit
---
# defaults file for ansible-cgit
---
# handlers file for ansible-cgit
- name: Restart Apache - name: Restart Apache
service: service:
name: apache2 name: apache2
......
---
galaxy_info:
author: Nimrod Adar
description: cgit
company: Shore technologies
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker
# Some suggested licenses:
# - BSD (default)
# - MIT
# - GPLv2
# - GPLv3
# - Apache
# - CC-BY
license: MIT
min_ansible_version: 1.2
#
# Below are all platforms currently available. Just uncomment
# the ones that apply to your role. If you don't see your
# platform on this list, let us know and we'll get it added!
#
platforms:
#- name: EL
# versions:
# - all
# - 5
# - 6
# - 7
#- name: GenericUNIX
# versions:
# - all
# - any
#- name: Fedora
# versions:
# - all
# - 16
# - 17
# - 18
# - 19
# - 20
# - 21
# - 22
#- name: Windows
# versions:
# - all
# - 2012R2
#- name: SmartOS
# versions:
# - all
# - any
#- name: opensuse
# versions:
# - all
# - 12.1
# - 12.2
# - 12.3
# - 13.1
# - 13.2
#- name: Amazon
# versions:
# - all
# - 2013.03
# - 2013.09
#- name: GenericBSD
# versions:
# - all
# - any
#- name: FreeBSD
# versions:
# - all
# - 8.0
# - 8.1
# - 8.2
# - 8.3
# - 8.4
# - 9.0
# - 9.1
# - 9.1
# - 9.2
#- name: Ubuntu
# versions:
# - all
# - lucid
# - maverick
# - natty
# - oneiric
# - precise
# - quantal
# - raring
# - saucy
# - trusty
# - utopic
# - vivid
#- name: SLES
# versions:
# - all
# - 10SP3
# - 10SP4
# - 11
# - 11SP1
# - 11SP2
# - 11SP3
#- name: GenericLinux
# versions:
# - all
# - any
- name: Debian
versions:
# - all
# - etch
- jessie
# - lenny
# - squeeze
# - wheezy
#
# Below are all categories currently available. Just as with
# the platforms above, uncomment those that apply to your role.
#
#categories:
#- cloud
#- cloud:ec2
#- cloud:gce
#- cloud:rax
#- clustering
#- database
#- database:nosql
#- database:sql
#- development
#- monitoring
#- networking
#- packaging
#- system
#- web
dependencies: []
# List your role dependencies here, one per line.
# Be sure to remove the '[]' above if you add dependencies
# to this list.
---
# tasks file for ansible-cgit
- name: Install packages - name: Install packages
apt: apt:
name: '{{ item }}' name: '{{ item }}'
...@@ -9,12 +11,14 @@ ...@@ -9,12 +11,14 @@
- git - git
- apache2 - apache2
- python-docutils - python-docutils
- name: Enable mod-cgi - name: Enable mod-cgi
notify: notify:
- Restart Apache - Restart Apache
apache2_module: apache2_module:
name: cgi name: cgi
state: present state: present
- name: Add configuration for cgit css - name: Add configuration for cgit css
template: template:
src: cgit-css.conf.j2 src: cgit-css.conf.j2
...@@ -22,6 +26,7 @@ ...@@ -22,6 +26,7 @@
owner: root owner: root
group: root group: root
mode: '0644' mode: '0644'
- name: Create git repostories directory - name: Create git repostories directory
file: file:
path: /srv/git path: /srv/git
...@@ -29,6 +34,7 @@ ...@@ -29,6 +34,7 @@
group: www-data group: www-data
mode: '0777' mode: '0777'
state: directory state: directory
- name: Add symlink for rst2html (hack) - name: Add symlink for rst2html (hack)
file: file:
src: /usr/share/docutils/scripts/python2/rst2html src: /usr/share/docutils/scripts/python2/rst2html
...@@ -36,6 +42,7 @@ ...@@ -36,6 +42,7 @@
owner: root owner: root
group: root group: root
state: link state: link
- name: Configure cgit - name: Configure cgit
lineinfile: lineinfile:
dest: /etc/cgitrc dest: /etc/cgitrc
......
---
# vars file for ansible-cgit
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment