1
0
Fork 0

Use git shell

This commit is contained in:
Alex Kotov 2020-01-25 05:05:07 +05:00
parent dd40a6a61e
commit 028182d93d
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -8,6 +8,13 @@
roles:
- kotovalexarian.common
tasks:
- name: Install system packages
apt:
name:
- cgit
- finger
- git
- name: Create system group
group:
name: git
@ -50,11 +57,14 @@
group: root
mode: 'u=rw,g=r,o=r'
- name: Install system packages
apt:
name:
- cgit
- git
- name: Detect shell
shell: "/usr/bin/finger git | grep -oP 'Shell: \\K.*'"
register: detect_shell_result
changed_when: false
- name: Use git shell
command: '/usr/bin/chsh git -s /usr/bin/git-shell'
when: detect_shell_result.stdout != '/usr/bin/git-shell'
- name: Disable Apache configuration
command: '/usr/sbin/a2disconf cgit'