diff --git a/inventory.sample b/inventory.sample index 6617b7e7fa4eefaa56fc66a5f6c831c861473ec9..4af320bf594a80d813ab872ef9fc2f68b2c65b6d 100644 --- a/inventory.sample +++ b/inventory.sample @@ -79,4 +79,6 @@ timezone="Europe/Paris" user_shell=/bin/zsh [workstation:vars] +git_email=<GIT_EMAIL> +git_name=<GIT_NAME> timezone="Europe/Paris" diff --git a/tasks/user_cfg/my_user.yml b/tasks/user_cfg/my_user.yml index 426b4741c79760fbdde5b3d76915a0239f415f9e..804c200260091573b1fee3ed363e0dac16a3eaa9 100644 --- a/tasks/user_cfg/my_user.yml +++ b/tasks/user_cfg/my_user.yml @@ -20,6 +20,13 @@ loop_control: label: "{{ item | basename }}" +- name: MY USER | git config + become: true + ansible.builtin.template: + dest: "/home/{{ my_user }}/.gitconfig" + src: templates/gitconfig.j2 + mode: 0640 + - name: MY USER | ssh config become: true ansible.builtin.template: diff --git a/tasks/user_cfg/files/dotfiles/gitconfig b/tasks/user_cfg/templates/gitconfig.j2 similarity index 95% rename from tasks/user_cfg/files/dotfiles/gitconfig rename to tasks/user_cfg/templates/gitconfig.j2 index cae03f70828657fc8157059a6f3a851d0d8b109f..e771e7e03511d8c23e765ba38af291181c77eb56 100644 --- a/tasks/user_cfg/files/dotfiles/gitconfig +++ b/tasks/user_cfg/templates/gitconfig.j2 @@ -49,5 +49,5 @@ defaultBranch = stable [user] - name = freezed - email = git-expect-noreply@freezed.me + name = "{{ git_name }}" + email = "{{ git_email }}"