---

- name: Install golang via homebrew
  homebrew:
    name: go
    install_options: "{{ golang_brew_options }}"
    state: latest
  tags:
    - brew
    - golang

- name: Go path dirs
  command: "mkdir -p {{ gopath_dir}}/{{ item }}"
  with_items:
    - src
    - pkg
    - bin
  tags:
    - golang

- name: Install golang packages
  command: "go get -u -v {{ item }}"
  with_items: "{{ golang_default_packages }}"
  ignore_errors: yes
  tags:
    - golang
    - godep
    - dependencies

---

- name: Install golang via homebrew
  homebrew:
    name: go
    install_options: "{{ golang_brew_options }}"
    state: present
  tags:
    - brew
    - golang

- name: Go path dirs
  command: "mkdir -p {{ gopath_dir}}/{{ item }}"
  with_items:
    - src
    - pkg
    - bin
  tags:
    - golang

- name: Install golang packages
  command: "go get -u -v {{ item }}"
  with_items: "{{ golang_default_packages }}"
  ignore_errors: yes
  tags:
    - golang
    - godep
    - dependencies

Use present for golang install due to homebrew pin
chore: Use present for golang install due to homebrew pin
