diff --git a/README.rst b/README.rst index 96eb85dfe4f04ca9611d270d254ed438119f34f3..8f6f6241edb5f2aae6b20e69397b0a2b2f831134 100644 --- a/README.rst +++ b/README.rst @@ -2,6 +2,35 @@ Ansible-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 diff --git a/defaults/main.yml b/defaults/main.yml new file mode 100644 index 0000000000000000000000000000000000000000..09f250fc389fa19ee10fe9f896dc362d92ac7926 --- /dev/null +++ b/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for ansible-cgit diff --git a/handlers/main.yml b/handlers/main.yml index 0bd95596ef666e2985e7a4f86bd51c309d003dbc..ba3f831ffdd8b4af922dc59dc7fc277755ce879a 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,3 +1,5 @@ +--- +# handlers file for ansible-cgit - name: Restart Apache service: name: apache2 diff --git a/meta/main.yml b/meta/main.yml new file mode 100644 index 0000000000000000000000000000000000000000..5e8da8f293ac169bef713e1b154a042268e2d468 --- /dev/null +++ b/meta/main.yml @@ -0,0 +1,139 @@ +--- +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. + diff --git a/tasks/main.yml b/tasks/main.yml index c3ee7ac0c89609c63f0fd5e4c4c4c2cafd4456ce..1af670ceb63d546b46b8d8130cca4da9deb04f48 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,3 +1,5 @@ +--- +# tasks file for ansible-cgit - name: Install packages apt: name: '{{ item }}' @@ -9,12 +11,14 @@ - git - apache2 - python-docutils + - name: Enable mod-cgi notify: - Restart Apache apache2_module: name: cgi state: present + - name: Add configuration for cgit css template: src: cgit-css.conf.j2 @@ -22,6 +26,7 @@ owner: root group: root mode: '0644' + - name: Create git repostories directory file: path: /srv/git @@ -29,6 +34,7 @@ group: www-data mode: '0777' state: directory + - name: Add symlink for rst2html (hack) file: src: /usr/share/docutils/scripts/python2/rst2html @@ -36,6 +42,7 @@ owner: root group: root state: link + - name: Configure cgit lineinfile: dest: /etc/cgitrc diff --git a/vars/main.yml b/vars/main.yml new file mode 100644 index 0000000000000000000000000000000000000000..ff389b2ff10811846fe7bca9a24868ebc4a3acb5 --- /dev/null +++ b/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for ansible-cgit