---
- name: download go archive...
  become: yes
  become_user: root
  get_url: >
    url={{go_tgz_url}}
    dest=/tmp/{{go_tgz}}
    mode=0644

- name: create go version directory
  become: yes
  become_user: root
  file: >-
    path=/usr/local/{{go_name}}
    state=directory
    
- name: unarchive go...
  become: yes
  become_user: root
  unarchive: >
    copy=no
    src=/tmp/{{go_tgz}}
    dest=/usr/local/{{go_name}}
    creates=/usr/local/{{go_name}}/go

- name: link in latest go
  become: yes
  become_user: root
  file: >-
    src=/usr/local/{{go_name}}/go
    dest=/usr/local/go
    state=link

- name: set go environment variables
  become: yes
  become_user: root
  with_items:
    - go.sh
  template: >
    src={{item}}.j2
    dest={{go_profile_dir}}/{{item}}
    mode=0644

- name: install godep
  become: yes
  become_user: root
  command: go get github.com/tools/godep

---
- name: download go archive...
  become: yes
  become_user: root
  get_url: >
    url={{go_tgz_url}}
    dest=/tmp/{{go_tgz}}
    mode=0644

- name: create go version directory
  become: yes
  become_user: root
  file: >-
    path=/usr/local/{{go_name}}
    state=directory
    
- name: unarchive go...
  become: yes
  become_user: root
  unarchive: >
    copy=no
    src=/tmp/{{go_tgz}}
    dest=/usr/local/{{go_name}}
    creates=/usr/local/{{go_name}}/go

- name: link in latest go
  become: yes
  become_user: root
  file: >-
    src=/usr/local/{{go_name}}/go
    dest=/usr/local/go
    state=link

- name: set go environment variables
  become: yes
  become_user: root
  with_items:
    - go.sh
  template: >
    src={{item}}.j2
    dest={{go_profile_dir}}/{{item}}
    mode=0644

- name: install godep
  become: yes
  become_user: root
  shell: . {{go_profile_dir}}/go.sh && go get github.com/tools/godep
  args:
    creates: '{{go_path}}/src/github.com/tools/godep'

Fix the godep installation for non-darwin systems
Fix the godep installation for non-darwin systems
