Use is instead of | for tests

Newer ansible wants us to use is. Also, it reads more nicer.

Change-Id: I368369d146a422abbf94265036a7d280e47eedc0
This commit is contained in:
Monty Taylor 2019-01-07 14:01:32 +00:00
parent d7eb4df0b0
commit c5183d416d
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
5 changed files with 23 additions and 23 deletions

View File

@ -13,7 +13,7 @@
- name: Ensure that unbound is started
assert:
that:
- not unbound_service | changed
- unbound_service is not changed
# Until nodepool no longer embeds a forwarding.conf in the image, it is
# safe to assume that we'll be changing the forwarding configuration
@ -22,8 +22,8 @@
- name: Ensure that configuration was installed
assert:
that:
- forwarding_config | changed
- ttl_config | changed
- forwarding_config is changed
- ttl_config is changed
- name: Check if /etc/unbound/forwarding.conf exists
stat:

View File

@ -24,9 +24,9 @@
- name: Validate that directories were set correctly
assert:
that:
- not log_directory | changed
- log_directory | succeeded
- not artifact_directory | changed
- artifact_directory | succeeded
- not doc_directory | changed
- doc_directory | succeeded
- log_directory is not changed
- log_directory is succeeded
- artifact_directory is not changed
- artifact_directory is succeeded
- doc_directory is not changed
- doc_directory is succeeded

View File

@ -38,9 +38,9 @@
- name: Validate that files were pulled correctly
assert:
that:
- not local_log_content | changed
- local_log_content | succeeded
- not local_artifact_content | changed
- local_artifact_content | succeeded
- not local_doc_content | changed
- local_doc_content | succeeded
- local_log_content is not changed
- local_log_content is succeeded
- local_artifact_content is not changed
- local_artifact_content is succeeded
- local_doc_content is not changed
- local_doc_content is succeeded

View File

@ -20,8 +20,8 @@
- name: Validate that the shim was installed successfully
assert:
that:
- not directory | changed
- directory | succeeded
- directory is not changed
- directory is succeeded
- cloner.stat.exists
- cloner.stat.mode == "0755"
@ -77,8 +77,8 @@
- name: Validate zuul-cloner shim results
assert:
that:
- clone_with_required | succeeded
- clone_with_required | changed
- clone_with_required is succeeded
- clone_with_required is changed
- with_required_stat.stat.exists
- clone_without_required | failed
- clone_without_required is failed
- not without_required_stat.stat.exists

View File

@ -45,9 +45,9 @@
- name: assert test results
assert:
that:
- not ovs_installed | changed
- not ovs_running | changed
- not ovs_bridge | changed
- ovs_installed is not changed
- ovs_running is not changed
- ovs_bridge is not changed
- ovs_port.rc == 0
- "'Port \"br-infra_' in ovs_port.stdout"
- ovs_ping_switch.rc == 0