---
- name: dearchive gvm's git repo
  shell: '[ -d {{ home }}/.gvm/git.bak ] && mv {{ home }}/.gvm/git.bak {{ home }}/.gvm/.git || true'
  tags: ["go"]

- name: clone gvm
  git: dest={{ home }}/.gvm repo=https://github.com/moovweb/gvm.git
  tags: ["go"]

- name: complete gvm install
  template: src=templates/gvm.j2 dest={{ home }}/.gvm/scripts/gvm mode=0755
  tags: ["go"]

- name: install go
  shell: . {{ home }}/.gvm/scripts/gvm && gvm install go{{ golang_version }}
  tags: ["go"]

- name: set the default version of go
  shell: . {{ home }}/.gvm/scripts/gvm && gvm use go{{ golang_version }} --default
  tags: ["go"]

---
- name: dearchive gvm's git repo
  shell: '[ -d {{ home }}/.gvm/git.bak ] && mv {{ home }}/.gvm/git.bak {{ home }}/.gvm/.git || true'
  tags: ["go"]

- name: clone gvm
  git: dest={{ home }}/.gvm repo=https://github.com/moovweb/gvm.git
  tags: ["go"]

- name: complete gvm install
  template: src=templates/gvm.j2 dest={{ home }}/.gvm/scripts/gvm mode=0755
  tags: ["go"]

- name: install go
  shell: . {{ home }}/.gvm/scripts/gvm && gvm install go{{ golang_version }}
         executable=/bin/bash
  tags: ["go"]

- name: set the default version of go
  shell: . {{ home }}/.gvm/scripts/gvm && gvm use go{{ golang_version }} --default
         executable=/bin/bash
  tags: ["go"]

Use bash for gvm operations.
Use bash for gvm operations.
