]> git.somenet.org - root/pub/somesible.git/blob - roles/service/gitweb/tasks/main.yml
[roles/service/sympa] Mailinglist service
[root/pub/somesible.git] / roles / service / gitweb / tasks / main.yml
1 #####################################
2 ### someone"s ansible provisioner ###
3 #####################################
4 # Part of: https://git.somenet.org/root/pub/somesible.git
5 # 2017-2024 by someone <someone@somenet.org>
6 #
7 ---
8 - name: install gitweb
9   apt:
10     pkg:
11     - fcgiwrap
12     - gitweb
13     state: present
14     policy_rc_d: 101
15   tags: "online"
16
17
18 - name: add www-data user to group git
19   user:
20     name: "www-data"
21     groups: "git"
22     append: yes
23     createhome: no
24     state: present
25
26
27 - name: include vars_nginx_vhost_custom
28   include_vars:
29     file: "{{item}}"
30     name: vars_nginx_vhost_custom
31   with_first_found:
32     - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/vars_nginx_vhost_custom.yml"
33     - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/vars_nginx_vhost_custom.yml"
34     - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/vars_nginx_vhost_custom.yml"
35     - "default/vars_nginx_vhost_custom.yml"
36
37
38 - name: configure gitweb vhost
39   include_role:
40     name: server/nginx/vhost-unified
41   vars:
42     vhost_name: "git.somenet.org"
43     vhost_custom:
44       vhost_custom_pre_server: "{{vars_nginx_vhost_custom.vhost_custom_pre_server}}"
45       vhost_custom: "{{vars_nginx_vhost_custom.vhost_custom}}"
46
47
48 - name: setup gitweb config dir
49   file:
50     path: "/etc/gitweb/"
51     state: directory
52     mode: 0755
53     owner: "root"
54     group: "root"
55
56
57 - name: copy gitweb_public.cfg
58   copy:
59     src: "{{item}}"
60     dest: "/etc/gitweb/public.conf"
61     mode: 0644
62     owner: "root"
63     group: "root"
64   with_first_found:
65     - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/public.cfg"
66     - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/public.cfg"
67     - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/public.cfg"
68     - "default/public.cfg"
69
70
71 - name: copy public_header.html
72   copy:
73     src: "{{item}}"
74     dest: "/etc/gitweb/public_header.html"
75     mode: 0644
76     owner: "root"
77     group: "root"
78   with_first_found:
79     - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/public_header.html"
80     - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/public_header.html"
81     - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/public_header.html"
82     - "default/public_header.html"
83
84
85 - name: copy public_ht.html
86   copy:
87     src: "{{item}}"
88     dest: "/etc/gitweb/public_ht.html"
89     mode: 0644
90     owner: "root"
91     group: "root"
92   with_first_found:
93     - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/public_ht.html"
94     - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/public_ht.html"
95     - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/public_ht.html"
96     - "default/public_ht.html"