Re: [ansible-project] Re: gather factCisco Catalyst 9300 regarding l2_interfaces

2022-02-07 Thread L. Jankok
Thank you Sagar! Much appreciated. Op ma 7 feb. 2022 om 12:42 schreef Sagar Paul : > Hey Lucio, > > The scope of the l2_interfaces module depends on the command `show > running-config | section ^interface` the facts are generated with the > config op from the specific command. You may want to rai

Re: [ansible-project] Adding if statement inside a task

2022-02-07 Thread Dick Visser
On Mon, 7 Feb 2022 at 15:29, dudu.c...@gmail.com wrote: > Hi > I have the following playbook. > In the environment.yml file I have a parameter "tls=true" > > In the below task , In tghe URL I would put *https* if tls=true and *http* > if false. > Try: url: "http{{ 's' if tls else '' }}:/

Re: [ansible-project] Adding if statement inside a task

2022-02-07 Thread Rilindo Foster
Hi there! What was the problem that you are trying to solve? I don’t see an actual question that we can answer. > On Feb 7, 2022, at 8:29 AM, dudu.c...@gmail.com > wrote: > > Hi > I have the following playbook. > In the environment.yml file I have a parameter "tls=true" > > In the below ta

[ansible-project] Adding if statement inside a task

2022-02-07 Thread dudu.c...@gmail.com
Hi I have the following playbook. In the environment.yml file I have a parameter "tls=true" In the below task , In tghe URL I would put *https* if tls=true and *http* if false. - hosts: manager vars_files: - ./environment.yml tasks: - name: test - check connectivity to API get_

Re: [ansible-project] Re: gather factCisco Catalyst 9300 regarding l2_interfaces

2022-02-07 Thread Sagar Paul
Hey Lucio, The scope of the l2_interfaces module depends on the command `show running-config | section ^interface` the facts are generated with the config op from the specific command. You may want to raise a feature request here for an

Re: [ansible-project] How to extract a list of values of a field within a list of dictionaries when a key matches another list of values

2022-02-07 Thread jean-christophe manciot
Thanks, your first answer is exactly what I was looking for. :-) On Monday, February 7, 2022 at 2:32:38 AM UTC+1 uto...@gmail.com wrote: > This produces the list you want: > > --- > - name: Extracting a list of values of a field within a list of dictionaries > when a key matches another list of