aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--roles/my_workspace/tasks/main.yml14
-rw-r--r--roles/my_workspace/tasks/project.yml12
2 files changed, 12 insertions, 14 deletions
diff --git a/roles/my_workspace/tasks/main.yml b/roles/my_workspace/tasks/main.yml
index 462c8da..1393a43 100644
--- a/roles/my_workspace/tasks/main.yml
+++ b/roles/my_workspace/tasks/main.yml
@@ -15,20 +15,6 @@
- make
state: present
-- name: Configure git
- block:
- - name: Set user.name
- community.general.git_config:
- scope: global
- name: user.name
- value: '{{ my_workspace_git_name }}'
-
- - name: Set user.email
- community.general.git_config:
- scope: global
- name: user.email
- value: '{{ my_workspace_git_email }}'
-
- name: Update projects
ansible.builtin.include_tasks: project.yml
loop: '{{ my_workspace_projects }}'
diff --git a/roles/my_workspace/tasks/project.yml b/roles/my_workspace/tasks/project.yml
index cd21ddb..e788eef 100644
--- a/roles/my_workspace/tasks/project.yml
+++ b/roles/my_workspace/tasks/project.yml
@@ -10,6 +10,18 @@
dest: '{{ project_dir }}'
accept_hostkey: true
+ - name: Configure git repository
+ community.general.git_config:
+ scope: local
+ repo: '{{ project_dir }}'
+ name: '{{ item.name }}'
+ value: '{{ item.value }}'
+ loop:
+ - name: user.name
+ value: '{{ my_workspace_git_name }}'
+ - name: user.email
+ value: '{{ my_workspace_git_email }}'
+
- name: Check for Makefile
ansible.builtin.file:
path: '{{ project_dir }}/Makefile'