diff --git a/tasks/apt.yml b/tasks/apt.yml index b3ceff3e..ee994403 100644 --- a/tasks/apt.yml +++ b/tasks/apt.yml @@ -1,8 +1,6 @@ --- - name: remove deprecated or insecure packages | package-01 - package-09 apt: - name: '{{ item }}' + name: '{{ os_security_packages_list }}' state: 'absent' - with_items: - - '{{ os_security_packages_list }}' when: 'os_security_packages_clean' diff --git a/tasks/yum.yml b/tasks/yum.yml index 2f4000f7..f16f233d 100644 --- a/tasks/yum.yml +++ b/tasks/yum.yml @@ -40,8 +40,6 @@ - name: remove deprecated or insecure packages | package-01 - package-09 yum: - name: '{{ item }}' + name: '{{ os_security_packages_list }}' state: 'absent' - with_items: - - '{{ os_security_packages_list }}' when: os_security_packages_clean