1 | ---
|
---|
2 | - name: Check that docutils is installed
|
---|
3 | urpmi: name=python-docutils state=installed no_recommends=yes
|
---|
4 |
|
---|
5 | - name: Check that pip is installed
|
---|
6 | urpmi: name=python-pip state=installed no_recommends=yes
|
---|
7 |
|
---|
8 | - name: Install trac with fcgi
|
---|
9 | urpmi: name=trac-fcgi state=installed no_recommends=yes
|
---|
10 |
|
---|
11 | - name: Install trac plugins dir
|
---|
12 | file: path=/prj/trac/plugins mode=0775 owner=apache group=apache state=directory
|
---|
13 |
|
---|
14 | # Do it only at upgrade of trac:
|
---|
15 | #- name: Install trac plugins
|
---|
16 | #command: pip install --no-deps --upgrade -t /usr/lib/python3.10/site-packages/ {{ item }}
|
---|
17 | #with_items:
|
---|
18 | #- TracAccountManager
|
---|
19 | #- TracTags
|
---|
20 | #- TracRobotsTxt
|
---|
21 | #- TracSpamFilter
|
---|
22 | #- TracStats
|
---|
23 | #notify: upgrade trac
|
---|
24 |
|
---|
25 | # Do it only at upgrade of trac:
|
---|
26 | #- name: Upgrade trac with new plugins
|
---|
27 | # command: trac-admin /prj/trac/{{ item }}.env upgrade
|
---|
28 | # loop: "{{ prj }}"
|
---|
29 |
|
---|
30 | - name: Configure trac
|
---|
31 | template: src=templates/trac.ini dest=/prj/trac/trac.ini owner=apache group=apache mode=0644 backup=yes
|
---|
32 | notify:
|
---|
33 | - restart httpd
|
---|
34 |
|
---|
35 | - name: Configure trac svn hook
|
---|
36 | copy: src=templates/trac-svn-hook dest=/prj/trac/trac-svn-hook owner=apache group=apache mode=0755 backup=yes
|
---|
37 |
|
---|
38 | - name: Configure svn post-commit hook
|
---|
39 | lineinfile: path="/prj/svn/{{ item }}/hooks/post-commit" state=present line='/prj/trac/trac-svn-hook $1 $2 $3 $4' owner=bruno group=bruno mode=0755 backup=yes create=true
|
---|
40 | loop: "{{ prj }}"
|
---|
41 |
|
---|
42 | - name: "Configure trac ini file for the projects"
|
---|
43 | copy: src="files/{{ item }}.ini" dest="/prj/trac/{{ item }}.env/conf/trac.ini" owner=apache group=apache mode=0644 backup=yes
|
---|
44 | loop: "{{ prj }}"
|
---|
45 | notify:
|
---|
46 | - restart httpd
|
---|
47 |
|
---|
48 | - name: "Configure trac log file for the projects"
|
---|
49 | file: path="/prj/trac/{{ item }}.env/log/trac.log" owner=apache group=bruno mode=0660
|
---|
50 | loop: "{{ prj }}"
|
---|
51 |
|
---|
52 | - name: "Configure trac db file for the projects"
|
---|
53 | file: path="/prj/trac/{{ item }}.env/db/trac.db" owner=apache group=bruno mode=0664
|
---|
54 | loop: "{{ prj }}"
|
---|
55 |
|
---|
56 | - name: "Configure trac db directory for the projects"
|
---|
57 | file: path="/prj/trac/{{ item }}.env/db" owner=apache group=bruno mode=0775
|
---|
58 | loop: "{{ prj }}"
|
---|
59 |
|
---|
60 | - name: Check that trac is running and enabled
|
---|
61 | service: name=httpd state=started enabled=yes
|
---|