---
## ---------------------
## Install Atom packages
## ---------------------
- name: install atom packages
  shell: apm install {{ item }}
  args:
    creates: "{{ ansible_user_dir }}/.atom/packages/{{ item }}"
  loop: "{{ atom_packages }}"

---
## ---------------------
## Install Atom packages
## ---------------------
- name: install atom packages
  command: apm install {{ item }}
  loop: "{{ atom_packages }}"
  args:
    creates: "{{ ansible_user_dir }}/.atom/packages/{{ item }}"
  # TODO: check mode is still skipped. pending PR https://github.com/ansible/ansible/pull/40428

Use command task for apm rather than shell for safety
Use command task for apm rather than shell for safety
