fixed it the way GG wants it fixed

This commit is contained in:
dspolleke 2021-04-12 17:43:47 +02:00
parent be8b356174
commit 34cc100e7c
2 changed files with 40 additions and 39 deletions

View file

@ -22,23 +22,27 @@
tags: ['mas']
tasks:
- include_tasks: tasks/ansible-setup.yml
- import_tasks: tasks/ansible-setup.yml
tags: ['setup']
- include_tasks: tasks/sudoers.yml
- import_tasks: tasks/sudoers.yml
when: configure_sudoers
tags: ['sudoers']
- include_tasks: tasks/terminal.yml
- import_tasks: tasks/terminal.yml
when: configure_terminal
tags: ['terminal']
- include_tasks: tasks/osx.yml
- import_tasks: tasks/osx.yml
when: configure_osx
tags: ['osx']
- include_tasks: tasks/extra-packages.yml
- import_tasks: tasks/extra-packages.yml
tags: ['extra-packages']
- name: Run configured post-provision ansible task files.
include_tasks: "{{ outer_item }}"
import_tasks: "{{ outer_item }}"
loop_control:
loop_var: outer_item
with_fileglob: "{{ post_provision_tasks|default(omit) }}"
tags: ['post']

View file

@ -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 }}"