Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

ZRAD-127: provision gitconfig into the vm #58

Merged
merged 5 commits into from
Nov 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions conf/vagrant/provisioning/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,29 @@
lineinfile: dest=/home/vagrant/.profile state=present line='export PALANTIR_ENVIRONMENT="vagrant"'
tags: common

- name: Common | Copy user's gitconfig from host
copy: src=~/.gitconfig dest=/home/vagrant/.gitconfig
tags: common

- name: Common | Get user.name from host's gitconfig
git_config:
name: user.name
scope: global
register: git_author_name
tags: common

- name: Common | Get user.email from host's gitconfig
git_config:
name: user.email
scope: global
register: git_author_email
tags: common

- name: Common | Copy gitconfig from template
template:
src: gitconfig
dest: /home/vagrant/.gitconfig

- name: Common | Copy gitignore
copy: src=roles/common/templates/gitignore dest=/home/vagrant/.gitignore
tags: common
Expand Down
4 changes: 4 additions & 0 deletions conf/vagrant/provisioning/roles/common/templates/gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This is Git's per-user configuration file.
[user]
name = {{ git_author_name.config_value }}
email = {{ git_author_email.config_value }}