mirror of
https://github.com/geerlingguy/mac-dev-playbook
synced 2024-11-21 19:33:03 +00:00
alien changes ;-)
This commit is contained in:
parent
6549a14014
commit
5ecb26666d
1 changed files with 30 additions and 33 deletions
|
@ -1,37 +1,34 @@
|
|||
---
|
||||
- name: Ensure extra packages
|
||||
block:
|
||||
- name: Install global Composer packages.
|
||||
composer:
|
||||
command: "{{ (item.state | default('present') == 'absent') | ternary('remove', 'require') }}"
|
||||
arguments: "{{ item.name | default(item) }} {{ item.version | default('@stable') }}"
|
||||
# Ansible 2.4 supports `global_command` making `working_dir` optional.
|
||||
working_dir: "{{ lookup('env', 'COMPOSER_HOME') | default('~/.composer', true) }}"
|
||||
loop: "{{ composer_packages }}"
|
||||
- name: Install global Composer packages.
|
||||
composer:
|
||||
command: "{{ (item.state | default('present') == 'absent') | ternary('remove', 'require') }}"
|
||||
arguments: "{{ item.name | default(item) }} {{ item.version | default('@stable') }}"
|
||||
# Ansible 2.4 supports `global_command` making `working_dir` optional.
|
||||
working_dir: "{{ lookup('env', 'COMPOSER_HOME') | default('~/.composer', true) }}"
|
||||
loop: "{{ composer_packages }}"
|
||||
|
||||
- name: Install global NPM packages.
|
||||
npm:
|
||||
name: "{{ item.name | default(item) }}"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
version: "{{ item.version | default(omit) }}"
|
||||
global: true
|
||||
executable: "{{ item.executable | default(omit) }}"
|
||||
loop: "{{ npm_packages }}"
|
||||
- name: Install global NPM packages.
|
||||
npm:
|
||||
name: "{{ item.name | default(item) }}"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
version: "{{ item.version | default(omit) }}"
|
||||
global: true
|
||||
executable: "{{ item.executable | default(omit) }}"
|
||||
loop: "{{ npm_packages }}"
|
||||
|
||||
- name: Install global Pip packages.
|
||||
pip:
|
||||
name: "{{ item.name | default(item) }}"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
version: "{{ item.version | default(omit) }}"
|
||||
executable: "{{ item.executable | default(omit) }}"
|
||||
loop: "{{ pip_packages }}"
|
||||
- name: Install global Pip packages.
|
||||
pip:
|
||||
name: "{{ item.name | default(item) }}"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
version: "{{ item.version | default(omit) }}"
|
||||
executable: "{{ item.executable | default(omit) }}"
|
||||
loop: "{{ pip_packages }}"
|
||||
|
||||
- name: Install global Ruby gems.
|
||||
gem:
|
||||
name: "{{ item.name | default(item) }}"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
version: "{{ item.version | default(omit) }}"
|
||||
user_install: false
|
||||
executable: "{{ item.executable | default(omit) }}"
|
||||
loop: "{{ gem_packages }}"
|
||||
tags: ['extra-packages']
|
||||
- name: Install global Ruby gems.
|
||||
gem:
|
||||
name: "{{ item.name | default(item) }}"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
version: "{{ item.version | default(omit) }}"
|
||||
user_install: false
|
||||
executable: "{{ item.executable | default(omit) }}"
|
||||
loop: "{{ gem_packages }}"
|
||||
|
|
Loading…
Reference in a new issue