---
- name: Prady A example 1
hosts: localhost
vars:
is_usa: true
tasks:
- name: Install packages with logical list
ansible.builtin.package:
# requires "ansible-galaxy collection install utoddl.logical"
name: "{{ rpms | utoddl.logical.logical }}"
state: present
vars:
rpms:
- vim
- lvm2
- if:
- and:
- "{{ is_usa }}"
- "{{ ansible_distribution_major_version | int <= 9 }}"
- xyz
See https://galaxy.ansible.com/utoddl/logical
for details and examples.--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAEuB3ApnYr7ZqRnLLCBBbnDbbTJonS90gud_GEmVp8XaQJqhng%40mail.gmail.com.
-- Todd
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/711653de-d6a9-9424-0492-0f2a1cdfb245%40gmail.com.