Sha256: 19e4e725739e9e96b939b30900e48f1ecb4b3a4cc5fc63687fb9bfa9223a923b

Contents?: true

Size: 1.44 KB

Versions: 27

Compression:

Stored size: 1.44 KB

Contents

---
- name: >-
    homebrew_name is 'yarn' if no versions is specified,
    else it is 'yarn@<version>'.
  set_fact:
    yarn_setup_brew_name: >-
      {{ 'yarn@'+yarn_setup_version if yarn_setup_version else 'yarn' }}


- name: >-
    `yarn_setup_can_brew_create` is true when the `yarn_setup_brew_create` 
    option is `true` and the state is either 'linked' or 'present'.
  set_fact:
    yarn_setup_can_brew_create: >-
      {{ yarn_setup_brew_create and yarn_setup_state == 'present' }}

- debug:
    msg: >-
      update_homebrew {{ lookup( 'every', 'update_homebrew', days=1 ) }}

- name: >-
    Make sure `{{ yarn_setup_brew_name }}` is {{ yarn_setup_state }}
    on macOS via Homebrew.
  homebrew:
    name: >-
      {{ yarn_setup_brew_name }}
    state: >-
      {{ yarn_setup_state }}
    update_homebrew: >-
      {{ lookup( 'every', 'update_homebrew', days=1 ) }}
  # ignore errors if we're in a config where we can create the formula
  ignore_errors: >-
    {{ yarn_setup_can_brew_create }}
  register: yarn_setup_brew_result

# - debug: var=yarn_setup_brew_result
# 
# - fail: msg=HERE


- when: >-
    'failed' in yarn_setup_brew_result and
    yarn_setup_can_brew_create
  name: >-
    Create Homebrew formula
  include: "{{ role_path }}/tasks/distribution/MacOSX/brew_create.yml"


- name: >-
    Link Yarn in Homebrew
  when: yarn_setup_brew_link
  homebrew:
    name: "{{ yarn_setup_brew_name }}"
    state: linked
    install_options:
    - overwrite
    

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
qb-0.4.5 roles/qb/nodejs/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.4.4 roles/qb/nodejs/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.4.3 roles/qb/nodejs/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.4.2 roles/qb/nodejs/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.4.1 roles/qb/nodejs/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.4.0 roles/qb/nodejs/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.3.25 roles/qb/nodejs/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.3.24 roles/qb/nodejs/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.3.23 roles/qb/nodejs/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.3.22 roles/qb/nodejs/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.3.21 roles/qb/nodejs/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.3.20 roles/qb/nodejs/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.3.19 roles/qb/nodejs/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.3.18 roles/qb/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.3.17 roles/qb/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.3.16 roles/qb/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.3.15 roles/qb/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.3.14 roles/qb/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.3.13 roles/qb/yarn/setup/tasks/distribution/MacOSX/main.yml
qb-0.3.12 roles/qb/yarn/setup/tasks/distribution/MacOSX/main.yml