diff options
author | Dmitry Ilvokhin <d@ilvokhin.com> | 2024-01-28 13:23:40 +0000 |
---|---|---|
committer | Dmitry Ilvokhin <d@ilvokhin.com> | 2024-01-28 13:23:40 +0000 |
commit | 342125c39807365567bd9c6aaaf7b83e2871c8b7 (patch) | |
tree | 28e561d41c7e66c8534bbe1f53d62c6fd0680387 /roles | |
parent | e2ee37f71a5059578605c77bdd0d8bad71049c5a (diff) | |
download | infra-342125c39807365567bd9c6aaaf7b83e2871c8b7.tar.gz infra-342125c39807365567bd9c6aaaf7b83e2871c8b7.tar.bz2 infra-342125c39807365567bd9c6aaaf7b83e2871c8b7.zip |
Add cgit role
Diffstat (limited to 'roles')
-rw-r--r-- | roles/cgit/tasks/main.yml | 29 | ||||
-rw-r--r-- | roles/git/tasks/main.yml | 5 |
2 files changed, 33 insertions, 1 deletions
diff --git a/roles/cgit/tasks/main.yml b/roles/cgit/tasks/main.yml new file mode 100644 index 0000000..22c1a68 --- /dev/null +++ b/roles/cgit/tasks/main.yml @@ -0,0 +1,29 @@ +- name: Install cgit + ansible.builtin.package: + name: + - cgit + state: present + +- ansible.builtin.include_role: + name: nginx + +- ansible.builtin.include_role: + name: git + +- name: Configure cgit for git.ilvokhin.com + ansible.builtin.copy: + src: files/cgitrc + dest: /etc/cgitrc + owner: root + group: root + mode: u+rw,g+r,o+r + +- name: Copy nginx for cgit + ansible.builtin.copy: + src: files/cgit.conf + dest: /etc/nginx/includes/cgit.conf + owner: root + group: root + mode: u+rw,g+rw,o+r + notify: + - Reload nginx diff --git a/roles/git/tasks/main.yml b/roles/git/tasks/main.yml index 4134e75..7d46aba 100644 --- a/roles/git/tasks/main.yml +++ b/roles/git/tasks/main.yml @@ -108,7 +108,7 @@ - name: Copy git.conf to handle git HTTP requests ansible.builtin.copy: src: files/git.conf - dest: /etc/nginx/includes + dest: /etc/nginx/includes/git.conf owner: root group: root mode: u+rw,g+rw,o+r @@ -135,3 +135,6 @@ state: link notify: - Reload nginx + +# TODO: +# 1. Make role for repository creation. |