aboutsummaryrefslogtreecommitdiffstats
path: root/roles/git/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/git/tasks/main.yml')
-rw-r--r--roles/git/tasks/main.yml30
1 files changed, 12 insertions, 18 deletions
diff --git a/roles/git/tasks/main.yml b/roles/git/tasks/main.yml
index 851287e..467378d 100644
--- a/roles/git/tasks/main.yml
+++ b/roles/git/tasks/main.yml
@@ -1,34 +1,33 @@
+---
+
- name: install git package
- package:
+ ansible.builtin.package:
name: git
state: present
- name: create git group
- group:
+ ansible.builtin.group:
name: "{{ git_group }}"
state: present
- name: create git user
- user:
+ ansible.builtin.user:
name: "{{ git_user }}"
group: "{{ git_group }}"
shell: "{{ git_shell }}"
home: "{{ git_dir }}"
- create_home: false
+ create_home: true
- name: create git directories
- file:
- path: "{{ item }}"
+ ansible.builtin.file:
+ path: "{{ git_dir }}/git-shell-commands"
owner: "{{ git_user }}"
group: "{{ git_group }}"
state: directory
- mode: 0755
- loop:
- - "{{ git_dir }}"
- - "{{ git_dir }}/git-shell-commands"
+ mode: "0755"
- name: generate git-shell no-login prompt
- template:
+ ansible.builtin.template:
src: no-interactive-login.j2
dest: "{{ git_dir }}/git-shell-commands/no-interactive-login"
owner: "{{ git_user }}"
@@ -37,14 +36,9 @@
when: not git_allow_ssh_login
- name: generate gitconfig
- template:
+ ansible.builtin.template:
src: gitconfig.j2
dest: "{{ git_dir }}/.gitconfig"
owner: "{{ git_user }}"
group: "{{ git_group }}"
- mode: 0644
-
-- name: include ssh key synchronization
- include_role:
- name: sshd
- tasks_from: synchronize_keys.yml
+ mode: "0644"
remember that computers suck.