Fixes ansible deprecation warnings

This implements the recommended syntax for searching to get rid of this;
---
[DEPRECATION WARNING]: Using tests as filters is deprecated.
Instead of using `result|search` use `result is search`.
This feature will be removed in version 2.9.
---

Change-Id: Ia8c6b66a4e2c6336e9374da6e3fdd81e17ba2346
This commit is contained in:
Jonathan Herlin 2018-11-17 00:49:56 +01:00
parent 284341bf24
commit 7d875523d8
1 changed files with 2 additions and 2 deletions

View File

@ -21,8 +21,8 @@
- name: Disable libvirt default network
command: "virsh net-autostart default --disable"
failed_when: false
when: default_net.stdout|search('default')
when: default_net.stdout.find('default') != -1
- name: Destroy libvirt default network
command: "virsh net-destroy default"
when: default_net.stdout|search('default')
when: default_net.stdout.find('default') != -1