Re: [ansible-project] [anisible]Install package

2023-08-14 Thread Prady A
Super cool . That’s what I was try in pseudo code.. Thanks a ton On Mon, Aug 14, 2023 at 20:07, Todd Lewis wrote: > Here's *my* solution. Whether you wish to go there is a different > question. > > --- > - name: Prady A example 1 > hosts: localhost > vars: > is_usa: true > tasks: >

Re: [ansible-project] [anisible]Install package

2023-08-14 Thread Todd Lewis
Here's /my/ solution. Whether you wish to go there is a different question. --- - 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

[ansible-project] [anisible]Install package

2023-08-14 Thread Prady A
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