From 60dd80953bfdeeb9bb9f0dadedf93586e49fd477 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 19 Apr 2018 14:38:29 +0200 Subject: [PATCH] library/roles/ubuntu-deb-general: Fix the apt parameters. The old ones are going to be deprecated. --- ubuntu-deb-general/defaults/main.yml | 2 +- ubuntu-deb-general/tasks/denyhost.yml | 2 +- ubuntu-deb-general/tasks/munin.yml | 2 +- ubuntu-deb-general/tasks/packages.yml | 4 ++-- ubuntu-deb-general/tasks/remove-unneeded-pkgs.yml | 10 +++++----- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ubuntu-deb-general/defaults/main.yml b/ubuntu-deb-general/defaults/main.yml index 355be958..47f088f7 100644 --- a/ubuntu-deb-general/defaults/main.yml +++ b/ubuntu-deb-general/defaults/main.yml @@ -5,7 +5,7 @@ use_apt_proxy: False dist_upgrade: False -pkg_state: installed +pkg_state: present common_packages: - acl - zile diff --git a/ubuntu-deb-general/tasks/denyhost.yml b/ubuntu-deb-general/tasks/denyhost.yml index d3a92105..1659981a 100644 --- a/ubuntu-deb-general/tasks/denyhost.yml +++ b/ubuntu-deb-general/tasks/denyhost.yml @@ -1,6 +1,6 @@ --- - name: install denyhosts on debian <=7 and ubuntu <= 12.04 - apt: pkg={{ item }} state=installed + apt: pkg={{ item }} state=present with_items: - denyhosts tags: denyhosts diff --git a/ubuntu-deb-general/tasks/munin.yml b/ubuntu-deb-general/tasks/munin.yml index 8e2552df..e632b448 100644 --- a/ubuntu-deb-general/tasks/munin.yml +++ b/ubuntu-deb-general/tasks/munin.yml @@ -1,6 +1,6 @@ --- - name: install munin-node - apt: pkg=munin-node state=installed + apt: pkg=munin-node state=present when: has_apt tags: - packages diff --git a/ubuntu-deb-general/tasks/packages.yml b/ubuntu-deb-general/tasks/packages.yml index 5b6864db..b8adfa64 100644 --- a/ubuntu-deb-general/tasks/packages.yml +++ b/ubuntu-deb-general/tasks/packages.yml @@ -1,11 +1,11 @@ --- - name: Install the basic packages - apt: pkg={{ item }} state=installed update_cache=yes cache_valid_time=1800 + apt: pkg={{ item }} state=present update_cache=yes cache_valid_time=1800 with_items: '{{ default_python_packages }}' tags: packages - name: Install software-properties-common if needed - apt: pkg=software-properties-common state=installed update_cache=yes cache_valid_time=1800 + apt: pkg=software-properties-common state=present update_cache=yes cache_valid_time=1800 when: is_ubuntu tags: packages diff --git a/ubuntu-deb-general/tasks/remove-unneeded-pkgs.yml b/ubuntu-deb-general/tasks/remove-unneeded-pkgs.yml index fb55c9da..b79d57c9 100644 --- a/ubuntu-deb-general/tasks/remove-unneeded-pkgs.yml +++ b/ubuntu-deb-general/tasks/remove-unneeded-pkgs.yml @@ -1,18 +1,18 @@ --- - name: Remove unneeded base packages - apt: pkg={{ item }} state=removed + apt: pkg={{ item }} state=absent with_items: '{{ cleanup_base_packages }}' when: cleanup_base_packages tags: [ 'packages', 'pkg_cleanup' ] - name: Remove unneeded X packages - apt: pkg={{ item }} state=removed + apt: pkg={{ item }} state=absent with_items: '{{ x_base_packages_to_remove }}' when: cleanup_x_base_packages tags: [ 'packages', 'pkg_cleanup' ] - name: Remove the nfs packages - apt: pkg={{ item }} state=removed + apt: pkg={{ item }} state=absent with_items: '{{ nfs_packages }}' when: - is_not_precise @@ -20,13 +20,13 @@ tags: [ 'packages', 'pkg_cleanup' ] - name: Remove rpcbind packages - apt: pkg={{ item }} state=removed + apt: pkg={{ item }} state=absent with_items: '{{ rpcbind_packages }}' when: cleanup_rpcbind_packages tags: [ 'packages', 'pkg_cleanup' ] - name: Remove the exim packages - apt: name={{ item }} state=removed + apt: name={{ item }} state=absent with_items: '{{ exim_email_server_pkgs }}' when: cleanup_exim_email_server tags: [ 'packages', 'pkg_cleanup', 'exim' ]