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

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -