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>
8 - name: install gitolite3
16 ignore_errors: "{{ignore_online_errors | bool}}"
19 - name: create git user
28 - name: create gitolite homedir
37 - name: create gitolite .ssh dir
39 path: "/srv/gitolite/.ssh"
46 - name: copy gitconfig
49 dest: "/srv/gitolite/.gitconfig"
54 - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/gitconfig"
55 - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/gitconfig"
56 - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/gitconfig"
60 - name: copy gitolite.rc
63 dest: "/srv/gitolite/.gitolite.rc"
68 - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/gitolite.rc"
69 - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/gitolite.rc"
70 - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/gitolite.rc"
71 - "default/gitolite.rc"
74 - name: setup gitolite
75 command: "gitolite setup -a gitolite"
80 - name: fix project.list permissions
82 path: "/srv/gitolite/projects.list"
89 - name: fix repositories permissions
91 path: "/srv/gitolite/repositories/"
94 mode: "u=rwX,g=rX,o-rwx"
99 - name: copy compact_gitolite_repos.sh
102 dest: "/srv/gitolite/compact_gitolite_repos.sh"
107 - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/compact_gitolite_repos.sh"
108 - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/compact_gitolite_repos.sh"
109 - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/compact_gitolite_repos.sh"
110 - "default/compact_gitolite_repos.sh"
113 - name: copy compact_gitolite_repos.service to /etc/systemd/system/
116 dest: "/etc/systemd/system/compact_gitolite_repos.service"
121 - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/compact_gitolite_repos.service"
122 - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/compact_gitolite_repos.service"
123 - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/compact_gitolite_repos.service"
124 - "default/compact_gitolite_repos.service"
127 - name: copy compact_gitolite_repos.timer to /etc/systemd/system/
130 dest: "/etc/systemd/system/compact_gitolite_repos.timer"
135 - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/compact_gitolite_repos.timer"
136 - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/compact_gitolite_repos.timer"
137 - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/compact_gitolite_repos.timer"
138 - "default/compact_gitolite_repos.timer"
141 - name: enable and start compact_gitolite_repos.timer
142 include_role: name="base/systemd/enable-and-start"
144 service_name: compact_gitolite_repos.timer