--- - name: Something hosts: temp become: false gather_facts: false vars: pkg_list: - https://dlcdn.apache.org//directory/apacheds/dist/2.0.0.AM27/apacheds-2.0.0.AM27-x86_64.rpm tasks: - name: Install packages from package list ansible.builtin.yum: name: "{{ pkg_list }}" state: present