Hi folks

I want to optimize the code here

Existing code:
package:
     name: “{{ item }}”
     state: present
with_items:
   - vim
   - lvm2
   - xyz
when: is_USA


Now I don’t want to install xyz PACKAGE for RHEL 9 server only then I ve to
rewrite the separate code for xyz package like below or any optimization is
possible in the existing code
———
package:
     name: “{{ item }}”
     state: present
with_items:
   - xyz
when:
    - is_USA
    - ansible_distribution_major_version| int <=9

——-
Regards

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAEuB3ApnYr7ZqRnLLCBBbnDbbTJonS90gud_GEmVp8XaQJqhng%40mail.gmail.com.

Reply via email to