Negate a Search Ansible -


looking little logic here. i’m looking fail out of playbook. when ios version of device does not begin 15. here’s block have far, can’t seem figure out not logic. fails of course when device in fact running ios 15.x.

  - name: validate ios version     fail:       msg: "device not running ios 15 or greater please upgrade"     when: ansible_net_version | search("^15\.") 

just gotta add not :)

- name: validate ios version   fail:     msg: "device not running ios 15 or greater please upgrade"   when: not ansible_net_version | search("^15\.") 

Comments

Popular posts from this blog

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -