--- # A package the role must remove, and the locales tool the role assumes exists # (it does on a stock Ubuntu host). jq (system_baseline_extra_packages) must be absent, so that the role is what installs it, and ed # (system_baseline_extra_remove_packages, on no profile list) must be present, so that the role is what purges it. - name: Prepare hosts: all gather_facts: false tasks: - name: Install a package on the role's remove list and locale-gen ansible.builtin.apt: name: [telnet, locales, ed] state: present update_cache: true - name: Make sure jq is not installed ansible.builtin.apt: name: jq state: absent