tests: teach controller.yml to configure git too

This commit is contained in:
David Wilson 2018-08-11 17:42:52 +01:00
parent 9e572a7939
commit df112be704
1 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,9 @@
- hosts: controller
vars:
git_username: '{{ lookup("pipe", "git config --global user.name") }}'
git_email: '{{ lookup("pipe", "git config --global user.email") }}'
tasks:
- lineinfile:
line: "net.ipv4.ip_forward=1"
@ -32,6 +36,11 @@
- shell: "rsync -a ~/.ssh {{inventory_hostname}}:"
connection: local
- shell: |
git config --global user.email "{{git_username}}"
git config --global user.name "{{git_email}}"
name: set_git_config
- git:
dest: ~/mitogen
repo: https://github.com/dw/mitogen.git