From 64b180cd2582b126ce56a34ba05afb5326509085 Mon Sep 17 00:00:00 2001 From: Raz Damaschin Date: Wed, 3 Jul 2019 08:54:41 -0500 Subject: [PATCH 1/2] fixed deprecation warning on apt --- .../06-configuring-servers/roles/common/tasks/security.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/intro-ansible/06-configuring-servers/roles/common/tasks/security.yml b/intro-ansible/06-configuring-servers/roles/common/tasks/security.yml index 4284b03..55fa4f2 100644 --- a/intro-ansible/06-configuring-servers/roles/common/tasks/security.yml +++ b/intro-ansible/06-configuring-servers/roles/common/tasks/security.yml @@ -1,14 +1,9 @@ # install security configuration - name: ensure python packages are installed apt: - name: "{{ item }}" + name: ['python3-pip', 'python3-dev', 'fail2ban'] update_cache: yes become: yes - with_items: - - "python3-pip" - - "python3-dev" - - "fail2ban" - - name: enable SSH within the firewall ufw: rule=allow port=22 From 213a049ffec5e713f0651e1a9c63066ce9bd9d8d Mon Sep 17 00:00:00 2001 From: Raz Damaschin Date: Wed, 3 Jul 2019 10:01:03 -0500 Subject: [PATCH 2/2] fixed deprecation warning on apt postgres --- .../roles/database/tasks/postgresql.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/intro-ansible/06-configuring-servers/roles/database/tasks/postgresql.yml b/intro-ansible/06-configuring-servers/roles/database/tasks/postgresql.yml index 7add0ec..bd7a7d4 100644 --- a/intro-ansible/06-configuring-servers/roles/database/tasks/postgresql.yml +++ b/intro-ansible/06-configuring-servers/roles/database/tasks/postgresql.yml @@ -1,12 +1,7 @@ # install and configure PostgreSQL database - name: ensure postgresql database packages are installed - apt: name={{ item }} - with_items: - - postgresql - - libpq-dev - - python3-psycopg2 - - postgresql-client - - postgresql-client-common + apt: + name: ['postgresql', 'libpq-dev', 'python3-psycopg2', 'postgresql-client', 'postgresql-client-common'] become: yes