Re: [ansible-project] When conditional does not work with ios_config module, please help

2021-04-11 Thread Stefan Hornburg (Racke)
On 4/11/21 3:40 PM, Vikram S wrote: > Hi Racke, > > I have been told the same thing earlier as you said now and i have also tested. When i give "'Apr 09 2021' in > show_flash_packages.stdout[0]", it seems to check the entire string and not just the first character.   > I give the exact when synt

Re: [ansible-project] When conditional does not work with ios_config module, please help

2021-04-11 Thread Vikram S
Hi Racke, I have been told the same thing earlier as you said now and i have also tested. When i give "'Apr 09 2021' in show_flash_packages.stdout[0]", it seems to check the entire string and not just the first character. I give the exact when syntax with ios_command module and other modules a

Re: [ansible-project] When conditional does not work with ios_config module, please help

2021-04-11 Thread Stefan Hornburg (Racke)
On 4/11/21 3:25 PM, Vikram S wrote: > Hi, > > I have written the below script to check if packages.conf has been updated > (by checking it's date) in flash and if so, > to set it as boot statement for switch. But ansible does not seem to consider > the when conditional at all. It sets the > boot

[ansible-project] When conditional does not work with ios_config module, please help

2021-04-11 Thread Vikram S
Hi, I have written the below script to check if packages.conf has been updated (by checking it's date) in flash and if so, to set it as boot statement for switch. But ansible does not seem to consider the when conditional at all. It sets the boot statement regardless of whether the condition ma