From 9de78f13f2bf5ef37b4b0a098d970d3a518faaaf Mon Sep 17 00:00:00 2001 From: binary Date: Wed, 16 Dec 2020 10:59:29 +0100 Subject: Introduce variable for git role --- roles/git/tasks/main.yml | 12 ++++++------ roles/git/vars/main.yml | 10 ++++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 roles/git/vars/main.yml (limited to 'roles/git') 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" + -- cgit v1.2.3