City-of-Bloomington / ansible-role-linux

Ansible role for common settings across linux servers
GNU General Public License v3.0
0 stars 3 forks source link

Update apt-get install commands to new syntax #9

Closed inghamn closed 5 years ago

inghamn commented 5 years ago

The old way of doing apt with-items is deprecated. The new way is to declare a variable for all the package names.

New style for apt-get install

- name: "Install Dependencies"
  apt:
    name: "{{ packages }}"
    state: present
  vars:
    packages:
      - "postgis"

Old, deprecated style

- name: "Install Dependencies"
  apt:
    name: "{{ item }}"
    state: present
  with_items:
    - "postgis"