aboutsummaryrefslogtreecommitdiffstats
path: root/roles/git
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2020-12-16 10:59:29 +0100
committerbinary <me@rgoncalves.se>2020-12-16 16:10:25 +0100
commit9de78f13f2bf5ef37b4b0a098d970d3a518faaaf (patch)
treec4f24518639d705155bdc86466a7b05d906f5a7a /roles/git
parent7e823002132239fdada055364cd9572bb839c187 (diff)
downloadinfrastructure-9de78f13f2bf5ef37b4b0a098d970d3a518faaaf.tar.gz
Introduce variable for git role
Diffstat (limited to 'roles/git')
-rw-r--r--roles/git/tasks/main.yml12
-rw-r--r--roles/git/vars/main.yml10
2 files changed, 16 insertions, 6 deletions
diff --git a/roles/git/tasks/main.yml b/roles/git/tasks/main.yml
index c909acd..9e8c7c6 100644
--- a/roles/git/tasks/main.yml
+++ b/roles/git/tasks/main.yml
@@ -6,20 +6,20 @@
- name: create git group
group:
- name: git
+ name: "{{ git_group }}"
state: present
- name: create git user
user:
- name: git
- group: git
+ name: "{{ git_user }}"
+ group: "{{ git_group }}"
shell: "{{ path_gitshell }}"
- name: create git-only directory
file:
- path: /data/git
- owner: git
- group: git
+ path: "{{ git_dir }}"
+ owner: "{{ git_user }}"
+ group: "{{ git_group }}"
state: directory
mode: 0741
diff --git a/roles/git/vars/main.yml b/roles/git/vars/main.yml
new file mode 100644
index 0000000..7e02867
--- /dev/null
+++ b/roles/git/vars/main.yml
@@ -0,0 +1,10 @@
+
+# git ~~ roles/git/tasks/vars.yml
+# default vars for git role
+
+---
+
+git_user: "git"
+git_group: "git"
+git_dir: "/data/git"
+
remember that computers suck.