---
- name: install required packages
  become: true
  become_user: root
  apt:
    name:
      - ruby
      - ruby-dev
    state: "{{ taiga_upgrade | bool | ternary('latest', 'present') }}"
  tags:
    - install
    - front-install

- name: install required gems
  become: true
  become_user: "{{ taiga_user }}"
  gem:
    user_install: true
    name: "{{ item }}"
  with_items:
    - sass
    - scss_lint
  tags:
    - install
    - front-install

- name: install global NPM modules
  become: true
  become_user: root
  npm:
    name: "{{ item }}"
    global: true
    state: "{{ taiga_upgrade | bool | ternary('latest', 'present') }}"
  with_items:
    - gulp
  tags:
    - install
    - front-install

- name: install local NPM modules
  become: true
  become_user: "{{ taiga_user }}"
  npm:
    path: "{{ taiga_user_home }}/{{ taiga_front_checkout_dir }}"
    state: "{{ taiga_upgrade | bool | ternary('latest', 'present') }}"
  tags:
    - install
    - front-install

- name: run gulp deploy
  become: true
  become_user: "{{ taiga_user }}"
  shell: gulp deploy
  args:
    chdir: "{{ taiga_user_home }}/{{ taiga_front_checkout_dir }}"
    creates: "{{ taiga_user_home }}/{{ taiga_front_checkout_dir }}/dist/conf.example.json"
  tags:
    - config
    - front-config

---
- name: install required packages
  become: true
  become_user: root
  apt:
    name:
      - ruby
      - ruby-dev
    state: "{{ taiga_upgrade | bool | ternary('latest', 'present') }}"
  tags:
    - install
    - front-install

- name: install required gems
  become: true
  become_user: "{{ taiga_user }}"
  gem:
    user_install: true
    name: "{{ item }}"
  with_items:
    - sass
    - scss_lint
  tags:
    - install
    - front-install

- name: install global NPM modules
  become: true
  become_user: root
  npm:
    name: "{{ item }}"
    global: true
    state: "{{ taiga_upgrade | bool | ternary('latest', 'present') }}"
  with_items:
    - gulp
  tags:
    - install
    - front-install

- name: install local NPM modules
  become: true
  become_user: "{{ taiga_user }}"
  npm:
    path: "{{ taiga_user_home }}/{{ taiga_front_checkout_dir }}"
    state: "{{ taiga_upgrade | bool | ternary('latest', 'present') }}"
  tags:
    - install
    - front-install

- name: run gulp deploy
  become: true
  become_user: "{{ taiga_user }}"
  command: gulp deploy
  args:
    chdir: "{{ taiga_user_home }}/{{ taiga_front_checkout_dir }}"
    creates: "{{ taiga_user_home }}/{{ taiga_front_checkout_dir }}/dist/conf.example.json"
  tags:
    - config
    - front-config

Fix ansible-lint error 305, "Use shell only when shell functionality is required"
Fix ansible-lint error 305, "Use shell only when shell functionality is required"

In this case, we are not using any of the special features of shell,
so command will do just fine.
