From 646493774a8afe607adfa6272b3b951d68a5af24 Mon Sep 17 00:00:00 2001 From: Chris Croome <chris@webarchitects.co.uk> Date: Wed, 17 May 2023 16:46:38 +0100 Subject: [PATCH] Fix rename variable --- tasks/main.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 8c38137..f7372c5 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -31,14 +31,14 @@ - name: Apache packages absent ansible.builtin.apt: - pkg: "{{ apache_packages_absent }}" + pkg: "{{ apache_pkgs_absent }}" state: absent update_cache: false when: - - apache_packages_absent is defined - - apache_packages_absent != [] + - apache_pkgs_absent is defined + - apache_pkgs_absent != [] - ansible_local.dpkg.installed is defined - - apache_packages_absent | ansible.builtin.intersect(ansible_local.dpkg.installed) != [] + - apache_pkgs_absent | ansible.builtin.intersect(ansible_local.dpkg.installed) != [] - name: Apache present from buster-backports ansible.builtin.apt: @@ -49,21 +49,21 @@ default_release: buster-backports update_cache: true when: - - apache_packages_present is defined + - apache_pkgs_present is defined - ( "apache2" in apache_pkgs_present ) - ansible_distribution_release == "buster" - name: Apache packages present ansible.builtin.apt: - pkg: "{{ apache_packages_present }}" + pkg: "{{ apache_pkgs_present }}" state: present install_recommends: true update_cache: false when: - - apache_packages_present is defined - - apache_packages_present != [] + - apache_pkgs_present is defined + - apache_pkgs_present != [] - ansible_local.dpkg.installed is defined - - apache_packages_present | ansible.builtin.difference(ansible_local.dpkg.installed) != [] + - apache_pkgs_present | ansible.builtin.difference(ansible_local.dpkg.installed) != [] when: >- ( ( apache_pkgs_absent is defined ) and ( apache_pkgs_absent != [] ) or -- GitLab