[3656] | 1 | ---
|
---|
| 2 | - name: Check that docutils is installed
|
---|
[3795] | 3 | urpmi: name=python-docutils state=installed no_recommends=yes
|
---|
[3656] | 4 |
|
---|
| 5 | - name: Check that pip is installed
|
---|
[3795] | 6 | urpmi: name=python-pip state=installed no_recommends=yes
|
---|
[3656] | 7 |
|
---|
| 8 | - name: Install trac with fcgi
|
---|
[3795] | 9 | urpmi: name=trac-fcgi state=installed no_recommends=yes
|
---|
[3656] | 10 |
|
---|
[3752] | 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:
|
---|
[3799] | 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
|
---|
[3656] | 24 |
|
---|
[3799] | 25 | # Do it only at upgrade of trac:
|
---|
[3656] | 26 | #- name: Upgrade trac with new plugins
|
---|
[3799] | 27 | # command: trac-admin /prj/trac/{{ item }}.env upgrade
|
---|
| 28 | # loop: "{{ prj }}"
|
---|
[3656] | 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 |
|
---|
[3799] | 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
|
---|
[3656] | 37 |
|
---|
[3799] | 38 | - name: Configure svn post-commit hook
|
---|
[3810] | 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
|
---|
[3799] | 40 | loop: "{{ prj }}"
|
---|
[3656] | 41 |
|
---|
[3799] | 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 }}"
|
---|
[3656] | 45 | notify:
|
---|
| 46 | - restart httpd
|
---|
| 47 |
|
---|
[3815] | 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 |
|
---|
[3816] | 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 |
|
---|
[3817] | 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 |
|
---|
[3656] | 60 | - name: Check that trac is running and enabled
|
---|
[3674] | 61 | service: name=httpd state=started enabled=yes
|
---|