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.yml23
1 files changed, 12 insertions, 11 deletions
diff --git a/roles/git/tasks/main.yml b/roles/git/tasks/main.yml
index 851287e..1f9d3d1 100644
--- a/roles/git/tasks/main.yml
+++ b/roles/git/tasks/main.yml
@@ -1,15 +1,17 @@
+---
+
- 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 }}"
@@ -17,18 +19,18 @@
create_home: false
- name: create git directories
- file:
+ ansible.builtin.file:
path: "{{ item }}"
owner: "{{ git_user }}"
group: "{{ git_group }}"
state: directory
- mode: 0755
+ mode: "0755"
loop:
- "{{ git_dir }}"
- "{{ git_dir }}/git-shell-commands"
- 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 +39,13 @@
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
+ mode: "0644"
- name: include ssh key synchronization
- include_role:
- name: sshd
- tasks_from: synchronize_keys.yml
+ ansible.builtin.include_role:
+ name: sshd_keys
remember that computers suck.