---
- name: ensure bin/fresh is executable
  file:
    path: "{{ home }}/.fresh/bin/fresh"
    mode: 0755

- name: ensure bin/fresh is accessible
  file:
    src: "{{ home }}/.fresh/bin/fresh"
    dest: /usr/local/bin/fresh
    state: link

# Fail early if incorrect sudo password supplied
- name: check sudo password
  become: yes
  shell: whoami
  changed_when: false

- name: check ansible version
  assert:
    that: ansible_version.major <= 2
    msg: fresh requires at least Ansible 2.0, please update!

---
- name: ensure bin/fresh is executable
  file:
    path: "{{ home }}/.fresh/bin/fresh"
    mode: 0755

- name: ensure bin/fresh is accessible
  file:
    src: "{{ home }}/.fresh/bin/fresh"
    dest: /usr/local/bin/fresh
    state: link

- name: check ansible version
  assert:
    that: ansible_version.major <= 2
    msg: fresh requires at least Ansible 2.0, please update!

Move sudo check outside of init, so it doesn't break init
Move sudo check outside of init, so it doesn't break init