Deprecate tests used as filters (#32361)

* Warn on tests used as filters

* Update docs, add aliases for tests that fit more gramatically with test syntax

* Fix rst formatting

* Add successful filter, alias of success

* Remove renamed_deprecation, it was overkill

* Make directory alias for is_dir

* Update tests to use proper jinja test syntax

* Update additional documentation, living outside of YAML files, to reflect proper jinja test syntax

* Add conversion script, porting guide updates, and changelog updates

* Update newly added uses of tests as filters

* No underscore variable

* Convert recent tests as filter changes to win_stat

* Fix some changes related to rebasing a few integration tests

* Make tests_as_filters_warning explicitly accept the name of the test, instead of inferring the name

* Add test for tests_as_filters_warning

* Update tests as filters in newly added/modified tests

* Address recent changes to several integration tests

* Address recent changes in cs_vpc
pull/33002/head
Matt Martz 7 years ago committed by ansibot
parent fd4a6cf7ad
commit 4fe08441be

@ -14,6 +14,7 @@ Ansible Changes By Release
### Deprecations ### Deprecations
* Previously deprecated 'hostfile' config settings have been 're-deprecated' as previously code did not warn about deprecated configuration settings. * Previously deprecated 'hostfile' config settings have been 're-deprecated' as previously code did not warn about deprecated configuration settings.
* Using Ansible provided Jinja tests as filters is deprecated and will be removed in Ansible 2.9
### Minor Changes ### Minor Changes
* added a few new magic vars corresponding to configuration/command line options: * added a few new magic vars corresponding to configuration/command line options:

@ -296,7 +296,7 @@ If running on a version of Ansible that is older than 2.5 or the normal
- name: reboot after disabling UAC - name: reboot after disabling UAC
win_reboot: win_reboot:
when: uac_result|changed when: uac_result is changed
.. Note:: Granting the ``SeTcbPrivilege`` or turning UAC off can cause Windows .. Note:: Granting the ``SeTcbPrivilege`` or turning UAC off can cause Windows
security vulnerabilities and care should be given if these steps are taken. security vulnerabilities and care should be given if these steps are taken.

@ -252,7 +252,7 @@ idempotent and does not report changes. For example:
- name: assert remove a file (check mode) - name: assert remove a file (check mode)
assert: assert:
that: that:
- remove_file_check|changed - remove_file_check is changed
- remove_file_actual_check.stdout == 'true\r\n' - remove_file_actual_check.stdout == 'true\r\n'
- name: remove a file - name: remove a file
@ -268,7 +268,7 @@ idempotent and does not report changes. For example:
- name: assert remove a file - name: assert remove a file
assert: assert:
that: that:
- remove_file|changed - remove_file is changed
- remove_file_actual.stdout == 'false\r\n' - remove_file_actual.stdout == 'false\r\n'
- name: remove a file (idempotent) - name: remove a file (idempotent)
@ -280,7 +280,7 @@ idempotent and does not report changes. For example:
- name: assert remove a file (idempotent) - name: assert remove a file (idempotent)
assert: assert:
that: that:
- not remove_file_again|changed - not remove_file_again is changed
Windows communication and development support Windows communication and development support

@ -57,14 +57,14 @@ decide to do something conditionally based on success or failure::
ignore_errors: True ignore_errors: True
- command: /bin/something - command: /bin/something
when: result|failed when: result is failed
# In older versions of ansible use |success, now both are valid but succeeded uses the correct tense. # In older versions of ansible use ``success``, now both are valid but succeeded uses the correct tense.
- command: /bin/something_else - command: /bin/something_else
when: result|succeeded when: result is succeeded
- command: /bin/still/something_else - command: /bin/still/something_else
when: result|skipped when: result is skipped
.. note:: both `success` and `succeeded` work (`fail`/`failed`, etc). .. note:: both `success` and `succeeded` work (`fail`/`failed`, etc).

@ -4,14 +4,32 @@ Tests
.. contents:: Topics .. contents:: Topics
Tests in Jinja2 are a way of evaluating template expressions and returning True or False. `Tests <http://jinja.pocoo.org/docs/dev/templates/#tests>`_ in Jinja are a way of evaluating template expressions and returning True or False.
Jinja2 ships with many of these. See `builtin tests`_ in the official Jinja2 template documentation. Jinja ships with many of these. See `builtin tests`_ in the official Jinja template documentation.
Tests are very similar to filters and are used mostly the same way, but they can also be used in list processing filters, like C(map()) and C(select()) to choose items in the list.
The main difference between tests and filters are that Jinja tests are used for comparisons, whereas filters are used for data manipulation, and have different applications in jinja. Tests can also be used in list processing filters, like C(map()) and C(select()) to choose items in the list.
Like all templating, tests always execute on the Ansible controller, **not** on the target of a task, as they test local data. Like all templating, tests always execute on the Ansible controller, **not** on the target of a task, as they test local data.
In addition to those Jinja2 tests, Ansible supplies a few more and users can easily create their own. In addition to those Jinja2 tests, Ansible supplies a few more and users can easily create their own.
.. _test_syntax:
Test syntax
```````````
`Test syntax <http://jinja.pocoo.org/docs/dev/templates/#tests>`_ varies from `filter syntax <http://jinja.pocoo.org/docs/dev/templates/#filters>`_ (``variable | filter``). Historically Ansible has registered tests as both jinja tests and jinja filters, allowing for them to be referenced using filter syntax.
As of Ansible 2.5, using a jinja test as a filter will generate a warning.
The syntax for using a jinja test is as follows::
variable is test_name
Such as::
result is failed
.. _testing_strings: .. _testing_strings:
Testing strings Testing strings
@ -24,13 +42,13 @@ To match strings against a substring or a regex, use the "match" or "search" fil
tasks: tasks:
- debug: "msg='matched pattern 1'" - debug: "msg='matched pattern 1'"
when: url | match("http://example.com/users/.*/resources/.*") when: url is match("http://example.com/users/.*/resources/.*")
- debug: "msg='matched pattern 2'" - debug: "msg='matched pattern 2'"
when: url | search("/users/.*/resources/.*") when: url is search("/users/.*/resources/.*")
- debug: "msg='matched pattern 3'" - debug: "msg='matched pattern 3'"
when: url | search("/users/") when: url is search("/users/")
'match' requires a complete match in the string, while 'search' only requires matching a subset of the string. 'match' requires a complete match in the string, while 'search' only requires matching a subset of the string.
@ -42,23 +60,25 @@ Version Comparison
.. versionadded:: 1.6 .. versionadded:: 1.6
.. note:: In 2.5 ``version_compare`` was renamed to ``version``
To compare a version number, such as checking if the ``ansible_distribution_version`` To compare a version number, such as checking if the ``ansible_distribution_version``
version is greater than or equal to '12.04', you can use the ``version_compare`` filter. version is greater than or equal to '12.04', you can use the ``version`` test.
The ``version_compare`` filter can also be used to evaluate the ``ansible_distribution_version``:: The ``version`` test can also be used to evaluate the ``ansible_distribution_version``::
{{ ansible_distribution_version | version_compare('12.04', '>=') }} {{ ansible_distribution_version is version('12.04', '>=') }}
If ``ansible_distribution_version`` is greater than or equal to 12, this filter returns True, otherwise False. If ``ansible_distribution_version`` is greater than or equal to 12, this test returns True, otherwise False.
The ``version_compare`` filter accepts the following operators:: The ``version`` test accepts the following operators::
<, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne
This test also accepts a 3rd parameter, ``strict`` which defines if strict version parsing should This test also accepts a 3rd parameter, ``strict`` which defines if strict version parsing should
be used. The default is ``False``, but this setting as ``True`` uses more strict version parsing:: be used. The default is ``False``, but this setting as ``True`` uses more strict version parsing::
{{ sample_version_var | version_compare('1.0', operator='lt', strict=True) }} {{ sample_version_var is version('1.0', operator='lt', strict=True) }}
.. _math_tests: .. _math_tests:
@ -68,17 +88,19 @@ Group theory tests
.. versionadded:: 2.1 .. versionadded:: 2.1
To see if a list includes or is included by another list, you can use 'issubset' and 'issuperset':: .. note:: In 2.5 ``issubset`` and ``issuperset`` were renamed to ``subset`` and ``superset``
To see if a list includes or is included by another list, you can use 'subset' and 'superset'::
vars: vars:
a: [1,2,3,4,5] a: [1,2,3,4,5]
b: [2,3] b: [2,3]
tasks: tasks:
- debug: msg="A includes B" - debug: msg="A includes B"
when: a|issuperset(b) when: a is superset(b)
- debug: msg="B is included in A" - debug: msg="B is included in A"
when: b|issubset(a) when: b is subset(a)
.. _path_tests: .. _path_tests:
@ -101,33 +123,35 @@ You can use `any` and `all` to check if any or all elements in a list are true o
when: mylist is all when: mylist is all
- debug: msg="at least one is true" - debug: msg="at least one is true"
when: myotherlist|any when: myotherlist is any
Testing paths Testing paths
````````````` `````````````
.. note:: In 2.5 the follwing tests were renamed to remove the ``is_`` prefix
The following tests can provide information about a path on the controller:: The following tests can provide information about a path on the controller::
- debug: msg="path is a directory" - debug: msg="path is a directory"
when: mypath|is_dir when: mypath is directory
- debug: msg="path is a file" - debug: msg="path is a file"
when: mypath|is_file when: mypath is file
- debug: msg="path is a symlink" - debug: msg="path is a symlink"
when: mypath|is_link when: mypath is link
- debug: msg="path already exists" - debug: msg="path already exists"
when: mypath|exists when: mypath is exists
- debug: msg="path is {{ (mypath|is_abs)|ternary('absolute','relative')}}" - debug: msg="path is {{ (mypath is abs)|ternary('absolute','relative')}}"
- debug: msg="path is the same file as path2" - debug: msg="path is the same file as path2"
when: mypath|samefile(path2) when: mypath is same_file(path2)
- debug: msg="path is a mount" - debug: msg="path is a mount"
when: mypath|is_mount when: mypath is mount
.. _test_task_results: .. _test_task_results:
@ -144,20 +168,20 @@ The following tasks are illustrative of the tests meant to check the status of t
ignore_errors: True ignore_errors: True
- debug: msg="it failed" - debug: msg="it failed"
when: result|failed when: result is failed
# in most cases you'll want a handler, but if you want to do something right now, this is nice # in most cases you'll want a handler, but if you want to do something right now, this is nice
- debug: msg="it changed" - debug: msg="it changed"
when: result|changed when: result is changed
- debug: msg="it succeeded in Ansible >= 2.1" - debug: msg="it succeeded in Ansible >= 2.1"
when: result|succeeded when: result is succeeded
- debug: msg="it succeeded" - debug: msg="it succeeded"
when: result|success when: result is success
- debug: msg="it was skipped" - debug: msg="it was skipped"
when: result|skipped when: result is skipped
.. note:: From 2.1, you can also use success, failure, change, and skip so that the grammar matches, for those who need to be strict about it. .. note:: From 2.1, you can also use success, failure, change, and skip so that the grammar matches, for those who need to be strict about it.

@ -22,7 +22,42 @@ No notable changes.
Deprecated Deprecated
========== ==========
No notable changes. Jinja tests used as filters
---------------------------
Using Ansible provided jinja tests as filters will be removed in Ansible 2.9.
Prior to Ansible 2.5, jinja tests included within Ansible were most often used as filters. The large difference in use is that filters are referenced as ``variable | filter_name`` where as jinja tests are refereced as ``variable is test_name``.
Jinja tests are used for comparisons, whereas filters are used for data manipulation, and have different applications in jinja. This change is to help differentiate the concepts for a better understanding of jinja, and where each can be appropriately used.
As of Ansible 2.5 using an Ansible provided jinja test with filter syntax, will display a deprecation error.
**OLD** In Ansible 2.4 (and earlier) the use of an Ansible included jinja test would likely look like this:
.. code-block:: yaml
when:
- result | failed
- not result | success
**NEW** In Ansible 2.5 it should be changed to look like this:
.. code-block:: yaml
when:
- result is failed
- results is not successful
In addition to the deprecation warnings, many new tests have been introduced that are aliases of the old tests, that make more sense grammatically with the jinja test syntax such as the new ``successful`` test which aliases ``success``
.. code-block:: yaml
when: result is successful
See :ref:`The Ansible Tests Documentation <playbooks_tests>` for more information.
Additionally, a script was created to assist in the conversion for tests using filter syntax to proper jinja test syntax. This script has been used to convert all of the Ansible integration tests to the correct format. There are a few limitations documented, and all changes made by this script should be evaluated for correctness before executing the modified playbooks. The script can be found at `https://github.com/ansible/ansible/blob/devel/hacking/fix_test_syntax.py <https://github.com/ansible/ansible/blob/devel/hacking/fix_test_syntax.py>`_.
Modules Modules
======= =======
@ -41,7 +76,7 @@ The following modules no longer exist:
Deprecation notices Deprecation notices
------------------- -------------------
The following modules will be removed in Ansible 2.8. Please update update your playbooks accordingly. The following modules will be removed in Ansible 2.9. Please update update your playbooks accordingly.
* :ref:`fixme <fixme>` * :ref:`fixme <fixme>`

@ -62,6 +62,11 @@ The module formatter is a script used to generate manpages and online
module documentation. This is used by the system makefiles and rarely module documentation. This is used by the system makefiles and rarely
needs to be run directly. needs to be run directly.
fix_test_syntax.py
------------------
A script to assist in the conversion for tests using filter syntax to proper jinja test syntax. This script has been used to convert all of the Ansible integration tests to the correct format for the 2.5 release. There are a few limitations documented, and all changes made by this script should be evaluated for correctness before executing the modified playbooks.
Authors Authors
------- -------
'authors' is a simple script that generates a list of everyone who has 'authors' is a simple script that generates a list of everyone who has

@ -0,0 +1,113 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2017, Michael DeHaan <matt@sivel.net>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Purpose:
# The purpose of this script is to convert uses of tests as filters to proper jinja test syntax
# as part of https://github.com/ansible/proposals/issues/83
# Notes:
# This script is imperfect, but was close enough to "fix" all integration tests
# with the exception of:
#
# 1. One file needed manual remediation, where \\\\ was ultimately replace with \\ in 8 locations.
# 2. Multiple filter pipeline is unsupported. Example:
# var|string|search('foo')
# Which should be converted to:
# var|string is search('foo')
import argparse
import os
import re
from ansible.plugins.test import core, files, mathstuff
TESTS = list(core.TestModule().tests().keys()) + list(files.TestModule().tests().keys()) + list(mathstuff.TestModule().tests().keys())
TEST_MAP = {
'version_compare': 'version',
'is_dir': 'directory',
'is_file': 'file',
'is_link': 'link',
'is_abs': 'abs',
'is_same_file': 'same_file',
'is_mount': 'mount',
'issubset': 'subset',
'issuperset': 'superset',
'isnan': 'nan',
'succeeded': 'successful',
'success': 'successful',
'change': 'changed',
'skip': 'skipped',
}
FILTER_RE = re.compile(r'((.+?)\s*([\w \.\'"]+)(\s*)\|(\s*)(\w+))')
NOT_RE = re.compile(r'( ?)not ')
ASSERT_SPACE_RE = re.compile(r'- ([\'"])\s+')
parser = argparse.ArgumentParser()
parser.add_argument(
'path',
help='Path to a directory that will be recursively walked. All .yml and .yaml files will be evaluated '
'and uses of tests as filters will be conveted to proper jinja test syntax files to have test syntax '
'fixed'
)
args = parser.parse_args()
for root, dirs, filenames in os.walk(args.path):
for name in filenames:
if os.path.splitext(name)[1] not in ('.yml', '.yaml'):
continue
path = os.path.join(root, name)
print(path)
with open(path) as f:
text = f.read()
for match in FILTER_RE.findall(text):
filter_name = match[5]
is_not = match[2].strip(' "\'').startswith('not ')
try:
test_name = TEST_MAP[filter_name]
except KeyError:
test_name = filter_name
if test_name not in TESTS:
continue
if is_not:
before = NOT_RE.sub(r'\1', match[2]).rstrip()
text = re.sub(
re.escape(match[0]),
'%s %s is not %s' % (match[1], before, test_name,),
text
)
else:
text = re.sub(
re.escape(match[0]),
'%s %s is %s' % (match[1], match[2].rstrip(), test_name,),
text
)
with open(path, 'w+') as f:
f.write(text)

@ -161,7 +161,7 @@ EXAMPLES = r'''
state: absent state: absent
register: result register: result
failed_when: failed_when:
- not result|success - result is not successful
- "'referenced by one or more applications' not in result.msg" - "'referenced by one or more applications' not in result.msg"
- name: Configure a service using more complicated parameters - name: Configure a service using more complicated parameters

@ -185,7 +185,7 @@ EXAMPLES = '''
state: present state: present
properties: properties:
name: "{{ enterprise_new_name }}-basic" name: "{{ enterprise_new_name }}-basic"
when: nuage_check_enterprise | failed when: nuage_check_enterprise is failed
# Creating a User in an Enterprise # Creating a User in an Enterprise
- name: Create admin user - name: Create admin user

@ -60,7 +60,7 @@ EXAMPLES = '''
key_filename: "/tmp/ssh.key" key_filename: "/tmp/ssh.key"
newpassword: "badpassword" newpassword: "badpassword"
register: result register: result
until: not result|failed until: result is not failed
retries: 10 retries: 10
delay: 30 delay: 30
''' '''

@ -70,7 +70,7 @@ EXAMPLES = '''
ip_address: "192.168.1.1" ip_address: "192.168.1.1"
password: "admin" password: "admin"
register: result register: result
until: not result|failed until: result is not failed
retries: 10 retries: 10
delay: 30 delay: 30
''' '''

@ -110,7 +110,7 @@ EXAMPLES = '''
# - copy: # - copy:
# dest: /var/www/html/{{ sample_com_challenge['challenge_data']['sample.com']['http-01']['resource'] }} # dest: /var/www/html/{{ sample_com_challenge['challenge_data']['sample.com']['http-01']['resource'] }}
# content: "{{ sample_com_challenge['challenge_data']['sample.com']['http-01']['resource_value'] }}" # content: "{{ sample_com_challenge['challenge_data']['sample.com']['http-01']['resource_value'] }}"
# when: sample_com_challenge|changed # when: sample_com_challenge is changed
- letsencrypt: - letsencrypt:
account_key: /etc/pki/cert/private/account.key account_key: /etc/pki/cert/private/account.key

@ -30,7 +30,7 @@ from ansible import errors
def failed(result): def failed(result):
''' Test if task result yields failed ''' ''' Test if task result yields failed '''
if not isinstance(result, MutableMapping): if not isinstance(result, MutableMapping):
raise errors.AnsibleFilterError("|failed expects a dictionary") raise errors.AnsibleFilterError("The failed test expects a dictionary")
return result.get('failed', False) return result.get('failed', False)
@ -42,7 +42,7 @@ def success(result):
def changed(result): def changed(result):
''' Test if task result yields changed ''' ''' Test if task result yields changed '''
if not isinstance(result, MutableMapping): if not isinstance(result, MutableMapping):
raise errors.AnsibleFilterError("|changed expects a dictionary") raise errors.AnsibleFilterError("The changed test expects a dictionary")
if 'changed' not in result: if 'changed' not in result:
changed = False changed = False
if ( if (
@ -62,7 +62,7 @@ def changed(result):
def skipped(result): def skipped(result):
''' Test if task result yields skipped ''' ''' Test if task result yields skipped '''
if not isinstance(result, MutableMapping): if not isinstance(result, MutableMapping):
raise errors.AnsibleFilterError("|skipped expects a dictionary") raise errors.AnsibleFilterError("The skipped test expects a dictionary")
return result.get('skipped', False) return result.get('skipped', False)
@ -129,6 +129,7 @@ class TestModule(object):
'failure': failed, 'failure': failed,
'succeeded': success, 'succeeded': success,
'success': success, 'success': success,
'successful': success,
# changed testing # changed testing
'changed': changed, 'changed': changed,
@ -145,6 +146,7 @@ class TestModule(object):
# version comparison # version comparison
'version_compare': version_compare, 'version_compare': version_compare,
'version': version_compare,
# lists # lists
'any': any, 'any': any,

@ -30,13 +30,19 @@ class TestModule(object):
return { return {
# file testing # file testing
'is_dir': isdir, 'is_dir': isdir,
'directory': isdir,
'is_file': isfile, 'is_file': isfile,
'file': isfile,
'is_link': islink, 'is_link': islink,
'link': islink,
'exists': exists, 'exists': exists,
'link_exists': lexists, 'link_exists': lexists,
# path testing # path testing
'is_abs': isabs, 'is_abs': isabs,
'abs': isabs,
'is_same_file': samefile, 'is_same_file': samefile,
'same_file': samefile,
'is_mount': ismount, 'is_mount': ismount,
'mount': ismount,
} }

@ -43,6 +43,9 @@ class TestModule:
return { return {
# set theory # set theory
'issubset': issubset, 'issubset': issubset,
'subset': issubset,
'issuperset': issuperset, 'issuperset': issuperset,
'superset': issuperset,
'isnan': isnotanumber, 'isnan': isnotanumber,
'nan': isnotanumber,
} }

@ -27,6 +27,7 @@ import pwd
import re import re
import time import time
from functools import wraps
from io import StringIO from io import StringIO
from numbers import Number from numbers import Number
@ -157,6 +158,26 @@ def _count_newlines_from_end(in_str):
return i return i
def tests_as_filters_warning(name, func):
'''
Closure to enable displaying a deprecation warning when tests are used as a filter
This closure is only used when registering ansible provided tests as filters
This function should be removed in 2.9 along with registering ansible provided tests as filters
in Templar._get_filters
'''
@wraps(func)
def wrapper(*args, **kwargs):
display.deprecated(
'Using tests as filters is deprecated. Instead of using `result|%(name)s` instead use '
'`result is %(name)s`' % dict(name=name),
version='2.9'
)
return func(*args, **kwargs)
return wrapper
class AnsibleContext(Context): class AnsibleContext(Context):
''' '''
A custom context, which intercepts resolve() calls and sets a flag A custom context, which intercepts resolve() calls and sets a flag
@ -283,7 +304,10 @@ class Templar:
self._filters = dict() self._filters = dict()
for fp in plugins: for fp in plugins:
self._filters.update(fp.filters()) self._filters.update(fp.filters())
self._filters.update(self._get_tests())
# TODO: Remove registering tests as filters in 2.9
for name, func in self._get_tests().items():
self._filters[name] = tests_as_filters_warning(name, func)
return self._filters.copy() return self._filters.copy()

@ -81,7 +81,7 @@
- name: "assert the specified version ({{new_version}}) is greater than the latest version ({{latest_version.stdout}})" - name: "assert the specified version ({{new_version}}) is greater than the latest version ({{latest_version.stdout}})"
assert: assert:
that: that:
- new_version|version_compare(latest_version.stdout, "gt") - new_version is version(latest_version.stdout, "gt")
ignore_errors: yes ignore_errors: yes
- name: Update the VERSION file for the main repo - name: Update the VERSION file for the main repo

@ -55,8 +55,8 @@
- name: verify output - name: verify output
assert: assert:
that: that:
- output|changed - output is changed
- not output|failed - output is not failed
- "'user:{{ ansible_user }}:r--' in output.acl" - "'user:{{ ansible_user }}:r--' in output.acl"
- "'user:{{ ansible_user }}:r--' in getfacl_output.stdout_lines" - "'user:{{ ansible_user }}:r--' in getfacl_output.stdout_lines"
############################################################################## ##############################################################################
@ -72,8 +72,8 @@
- name: verify output - name: verify output
assert: assert:
that: that:
- not output|changed - output is not changed
- not output|failed - output is not failed
- "'user::rw-' in output.acl" - "'user::rw-' in output.acl"
- "'user:{{ ansible_user }}:r--' in output.acl" - "'user:{{ ansible_user }}:r--' in output.acl"
- "'group::r--' in output.acl" - "'group::r--' in output.acl"
@ -100,8 +100,8 @@
- name: verify output - name: verify output
assert: assert:
that: that:
- output|changed - output is changed
- not output|failed - output is not failed
- "'user:{{ ansible_user }}:r--' not in output.acl" - "'user:{{ ansible_user }}:r--' not in output.acl"
- "'user:{{ ansible_user }}:r--' not in getfacl_output.stdout_lines" - "'user:{{ ansible_user }}:r--' not in getfacl_output.stdout_lines"
############################################################################## ##############################################################################
@ -122,8 +122,8 @@
- name: verify output - name: verify output
assert: assert:
that: that:
- output|changed - output is changed
- not output|failed - output is not failed
- "'user:{{ ansible_user }}:rw-' in output.acl" - "'user:{{ ansible_user }}:rw-' in output.acl"
- "'default:user:{{ ansible_user }}:rw-' in getfacl_output.stdout_lines" - "'default:user:{{ ansible_user }}:rw-' in getfacl_output.stdout_lines"
############################################################################## ##############################################################################
@ -145,8 +145,8 @@
- name: verify output - name: verify output
assert: assert:
that: that:
- output|changed - output is changed
- not output|failed - output is not failed
- "'user:{{ ansible_user }}:rw-' in output.acl" - "'user:{{ ansible_user }}:rw-' in output.acl"
- "'default:user:{{ ansible_user }}:rw-' in getfacl_output.stdout_lines" - "'default:user:{{ ansible_user }}:rw-' in getfacl_output.stdout_lines"
############################################################################## ##############################################################################
@ -165,8 +165,8 @@
- name: verify output - name: verify output
assert: assert:
that: that:
- not output|changed - output is not changed
- not output|failed - output is not failed
- "'user:{{ ansible_user }}:rw-' in output.acl" - "'user:{{ ansible_user }}:rw-' in output.acl"
- "'default:user:{{ ansible_user }}:rw-' in getfacl_output.stdout_lines" - "'default:user:{{ ansible_user }}:rw-' in getfacl_output.stdout_lines"
############################################################################## ##############################################################################
@ -198,8 +198,8 @@
- name: verify output - name: verify output
assert: assert:
that: that:
- output|changed - output is changed
- not output|failed - output is not failed
- "'user::rwx' in getfacl_output.stdout_lines" - "'user::rwx' in getfacl_output.stdout_lines"
- "'group::r-x' in getfacl_output.stdout_lines" - "'group::r-x' in getfacl_output.stdout_lines"
- "'other::r-x' in getfacl_output.stdout_lines" - "'other::r-x' in getfacl_output.stdout_lines"

@ -9,4 +9,4 @@
- name: Check previous task failed - name: Check previous task failed
assert: assert:
that: that:
- 'alternative|failed' - 'alternative is failed'

@ -12,8 +12,8 @@
- name: check expected command was executed - name: check expected command was executed
assert: assert:
that: that:
- 'alternative|success' - 'alternative is successful'
- 'alternative|changed' - 'alternative is changed'
when: with_link when: with_link
- block: - block:
@ -26,8 +26,8 @@
- name: check expected command was executed - name: check expected command was executed
assert: assert:
that: that:
- 'alternative|success' - 'alternative is successful'
- 'alternative|changed' - 'alternative is changed'
when: not with_link when: not with_link
- name: execute dummy command - name: execute dummy command

@ -16,7 +16,7 @@
- name: check expected command was executed - name: check expected command was executed
assert: assert:
that: that:
- 'alternative|changed' - 'alternative is changed'
- 'cmd.stdout == "dummy{{ item }}"' - 'cmd.stdout == "dummy{{ item }}"'
- name: check that alternative has been updated - name: check that alternative has been updated

@ -26,7 +26,7 @@
- name: uninstall quilt with apt - name: uninstall quilt with apt
apt: pkg=quilt state=absent purge=yes apt: pkg=quilt state=absent purge=yes
register: apt_result register: apt_result
when: dpkg_result|success when: dpkg_result is successful
tags: ['test_apt_builddep'] tags: ['test_apt_builddep']
# install build-dep for netcat # install build-dep for netcat

@ -4,12 +4,12 @@
- name: use python-apt - name: use python-apt
set_fact: set_fact:
python_apt: python-apt python_apt: python-apt
when: ansible_python_version | version_compare('3', '<') when: ansible_python_version is version('3', '<')
- name: use python3-apt - name: use python3-apt
set_fact: set_fact:
python_apt: python3-apt python_apt: python3-apt
when: ansible_python_version | version_compare('3', '>=') when: ansible_python_version is version('3', '>=')
# UNINSTALL 'python-apt' # UNINSTALL 'python-apt'
# The `apt` module has the smarts to auto-install `python-apt`. To test, we # The `apt` module has the smarts to auto-install `python-apt`. To test, we
@ -22,7 +22,7 @@
- name: uninstall {{ python_apt }} with apt - name: uninstall {{ python_apt }} with apt
apt: pkg={{ python_apt }} state=absent purge=yes apt: pkg={{ python_apt }} state=absent purge=yes
register: apt_result register: apt_result
when: dpkg_result|success when: dpkg_result is successful
# UNINSTALL 'hello' # UNINSTALL 'hello'
# With 'python-apt' uninstalled, the first call to 'apt' should install # With 'python-apt' uninstalled, the first call to 'apt' should install

@ -12,12 +12,12 @@
- name: use python-apt - name: use python-apt
set_fact: set_fact:
python_apt: python-apt python_apt: python-apt
when: ansible_python_version | version_compare('3', '<') when: ansible_python_version is version('3', '<')
- name: use python3-apt - name: use python3-apt
set_fact: set_fact:
python_apt: python3-apt python_apt: python3-apt
when: ansible_python_version | version_compare('3', '>=') when: ansible_python_version is version('3', '>=')
# UNINSTALL 'python-apt' # UNINSTALL 'python-apt'
# The `apt_repository` module has the smarts to auto-install `python-apt`. To # The `apt_repository` module has the smarts to auto-install `python-apt`. To
@ -30,7 +30,7 @@
- name: uninstall {{ python_apt }} with apt - name: uninstall {{ python_apt }} with apt
apt: pkg={{ python_apt }} state=absent purge=yes apt: pkg={{ python_apt }} state=absent purge=yes
register: apt_result register: apt_result
when: dpkg_result|success when: dpkg_result is successful
# #
# TEST: apt_repository: repo=<name> # TEST: apt_repository: repo=<name>

@ -101,8 +101,8 @@
that: that:
- async_result.ansible_job_id is match('\d+\.\d+') - async_result.ansible_job_id is match('\d+\.\d+')
- async_result.finished == 1 - async_result.finished == 1
- async_result | changed == false - async_result is changed == false
- async_result | failed - async_result is failed
- async_result.msg == 'failed gracefully' - async_result.msg == 'failed gracefully'
- name: test exception module failure - name: test exception module failure
@ -119,7 +119,7 @@
- async_result.ansible_job_id is match('\d+\.\d+') - async_result.ansible_job_id is match('\d+\.\d+')
- async_result.finished == 1 - async_result.finished == 1
- async_result.changed == false - async_result.changed == false
- async_result | failed == true - async_result is failed == true
- async_result.stderr is search('failing via exception', multiline=True) - async_result.stderr is search('failing via exception', multiline=True)
- name: test leading junk before JSON - name: test leading junk before JSON
@ -135,7 +135,7 @@
- async_result.ansible_job_id is match('\d+\.\d+') - async_result.ansible_job_id is match('\d+\.\d+')
- async_result.finished == 1 - async_result.finished == 1
- async_result.changed == true - async_result.changed == true
- async_result | success - async_result is successful
- name: test trailing junk after JSON - name: test trailing junk after JSON
async_test: async_test:
@ -150,5 +150,5 @@
- async_result.ansible_job_id is match('\d+\.\d+') - async_result.ansible_job_id is match('\d+\.\d+')
- async_result.finished == 1 - async_result.finished == 1
- async_result.changed == true - async_result.changed == true
- async_result | success - async_result is successful
- async_result.warnings[0] is search('trailing junk after module output') - async_result.warnings[0] is search('trailing junk after module output')

@ -106,7 +106,7 @@
- name: assert - name: assert
assert: assert:
that: that:
- bad_uri_result|failed - bad_uri_result is failed
# ============================================================ # ============================================================

@ -115,7 +115,7 @@
- name: assert lambda upload succeeded - name: assert lambda upload succeeded
assert: assert:
that: that:
- 'not result|failed' - 'result is not failed'
- name: test lambda works - name: test lambda works
execute_lambda: execute_lambda:
@ -131,7 +131,7 @@
- name: assert lambda manages to respond as expected - name: assert lambda manages to respond as expected
assert: assert:
that: that:
- 'not result|failed' - 'result is not failed'
- 'result.result.output.message == "hello Mr Ansible Tests"' - 'result.result.output.message == "hello Mr Ansible Tests"'
# ============================================================ # ============================================================
@ -157,7 +157,7 @@
- name: assert lambda fails with proper message - name: assert lambda fails with proper message
assert: assert:
that: that:
- 'result|failed' - 'result is failed'
- 'result.msg != "MODULE FAILURE"' - 'result.msg != "MODULE FAILURE"'
- 'result.changed == False' - 'result.changed == False'
- '"requires at least one security group and one subnet" in result.msg' - '"requires at least one security group and one subnet" in result.msg'
@ -188,7 +188,7 @@
- name: assert lambda remains as before - name: assert lambda remains as before
assert: assert:
that: that:
- 'not result|failed' - 'result is not failed'
- 'result.changed == False' - 'result.changed == False'
@ -212,7 +212,7 @@
- name: assert lambda upload succeeded - name: assert lambda upload succeeded
assert: assert:
that: that:
- 'not result|failed' - 'result is not failed'
- 'result.changed == True' - 'result.changed == True'
- name: test lambda works - name: test lambda works
@ -229,7 +229,7 @@
- name: assert lambda manages to respond as expected - name: assert lambda manages to respond as expected
assert: assert:
that: that:
- 'not result|failed' - 'result is not failed'
- 'result.result.output.message == "hello Mr Ansible Tests. I think you are great!!"' - 'result.result.output.message == "hello Mr Ansible Tests. I think you are great!!"'
# ============================================================ # ============================================================
@ -250,7 +250,7 @@
- name: assert lambda manages to respond as expected - name: assert lambda manages to respond as expected
assert: assert:
that: that:
- 'result|failed' - 'result is failed'
- 'result.changed == False' - 'result.changed == False'
# ============================================================ # ============================================================
@ -267,7 +267,7 @@
- name: assert state=absent - name: assert state=absent
assert: assert:
that: that:
- 'not result|failed' - 'result is not failed'
- 'result.changed == True' - 'result.changed == True'
# ============================================================ # ============================================================
@ -331,7 +331,7 @@
- name: assert lambda manages to respond as expected - name: assert lambda manages to respond as expected
assert: assert:
that: that:
- 'not result|failed' - 'result is not failed'
- name: wait for async job 1 - name: wait for async job 1
async_status: jid={{ async_1.ansible_job_id }} async_status: jid={{ async_1.ansible_job_id }}
@ -402,7 +402,7 @@
- name: assert lambda creation has succeeded - name: assert lambda creation has succeeded
assert: assert:
that: that:
- 'not result|failed' - 'result is not failed'
- name: wait for async job 1 - name: wait for async job 1
async_status: jid={{ async_1.ansible_job_id }} async_status: jid={{ async_1.ansible_job_id }}
@ -446,5 +446,5 @@
- name: assert state=absent - name: assert state=absent
assert: assert:
that: that:
- 'not result|failed' - 'result is not failed'
- 'result.changed == False' - 'result.changed == False'

@ -36,7 +36,7 @@
- assert: - assert:
that: that:
- 'async_hello_world.msg == "Hello, World!"' - 'async_hello_world.msg == "Hello, World!"'
when: not async_hello_world|skipped when: async_hello_world is not skipped
- name: Async Hello, Ansible! - name: Async Hello, Ansible!
action: "helloworld_{{ ansible_system|lower }}" action: "helloworld_{{ ansible_system|lower }}"
@ -50,4 +50,4 @@
- assert: - assert:
that: that:
- 'async_hello_ansible.msg == "Hello, Ansible!"' - 'async_hello_ansible.msg == "Hello, Ansible!"'
when: not async_hello_ansible|skipped when: async_hello_ansible is not skipped

@ -27,7 +27,7 @@
- name: verify that the file was marked as changed in check mode - name: verify that the file was marked as changed in check mode
assert: assert:
that: that:
- "template_result|changed" - "template_result is changed"
- "not foo.stat.exists" - "not foo.stat.exists"
- name: Actually create the file, disable check mode - name: Actually create the file, disable check mode
@ -46,5 +46,5 @@
- name: verify that the file was not changed - name: verify that the file was not changed
assert: assert:
that: that:
- "checkmode_disabled|changed" - "checkmode_disabled is changed"
- "not template_result2|changed" - "template_result2 is not changed"

@ -12,7 +12,7 @@
assert: assert:
that: that:
- "'汉语' in command.stdout" - "'汉语' in command.stdout"
- command | changed # as of 2.2, raw should default to changed: true for consistency w/ shell/command/script modules - command is changed # as of 2.2, raw should default to changed: true for consistency w/ shell/command/script modules
### copy local file with unicode filename and content ### copy local file with unicode filename and content

@ -14,8 +14,8 @@
- name: assert copy worked - name: assert copy worked
assert: assert:
that: that:
- 'copy_result|success' - 'copy_result is successful'
- 'copy_result|changed' - 'copy_result is changed'
- name: stat copied file - name: stat copied file
stat: stat:

@ -13,7 +13,7 @@
- name: Assert copy failed - name: Assert copy failed
assert: assert:
that: that:
- 'copy_result|failed' - 'copy_result is failed'
- name: Stat dest path - name: Stat dest path
stat: stat:

@ -108,7 +108,7 @@
- name: Assert that the file was not changed - name: Assert that the file was not changed
assert: assert:
that: that:
- "not copy_result2|changed" - "copy_result2 is not changed"
- name: Overwrite the file using the content system - name: Overwrite the file using the content system
copy: copy:
@ -129,7 +129,7 @@
- name: Assert that the file has changed - name: Assert that the file has changed
assert: assert:
that: that:
- "copy_result3|changed" - "copy_result3 is changed"
- "'content' not in copy_result3" - "'content' not in copy_result3"
- "stat_results.stat.checksum == ('modified'|hash('sha1'))" - "stat_results.stat.checksum == ('modified'|hash('sha1'))"
- "stat_results.stat.mode != '0700'" - "stat_results.stat.mode != '0700'"
@ -154,7 +154,7 @@
- name: Assert that the file has changed - name: Assert that the file has changed
assert: assert:
that: that:
- "copy_result3|changed" - "copy_result3 is changed"
- "'content' not in copy_result3" - "'content' not in copy_result3"
- "stat_results.stat.checksum == ('modified'|hash('sha1'))" - "stat_results.stat.checksum == ('modified'|hash('sha1'))"
- "stat_results.stat.mode == '0700'" - "stat_results.stat.mode == '0700'"
@ -269,7 +269,7 @@
- name: Assert that empty source failed - name: Assert that empty source failed
assert: assert:
that: that:
- failed_copy | failed - failed_copy is failed
- "'src (or content) is required' in failed_copy.msg" - "'src (or content) is required' in failed_copy.msg"
- name: Try without destination to ensure it fails - name: Try without destination to ensure it fails
@ -285,7 +285,7 @@
- name: Assert that missing destination failed - name: Assert that missing destination failed
assert: assert:
that: that:
- failed_copy | failed - failed_copy is failed
- "'dest is required' in failed_copy.msg" - "'dest is required' in failed_copy.msg"
- name: Try without source to ensure it fails - name: Try without source to ensure it fails
@ -301,7 +301,7 @@
- name: Assert that missing source failed - name: Assert that missing source failed
assert: assert:
that: that:
- failed_copy | failed - failed_copy is failed
- "'src (or content) is required' in failed_copy.msg" - "'src (or content) is required' in failed_copy.msg"
- name: Try with both src and content to ensure it fails - name: Try with both src and content to ensure it fails
@ -315,7 +315,7 @@
- name: Assert that mutually exclusive parameters failed - name: Assert that mutually exclusive parameters failed
assert: assert:
that: that:
- failed_copy | failed - failed_copy is failed
- "'mutually exclusive' in failed_copy.msg" - "'mutually exclusive' in failed_copy.msg"
- name: Try with content and directory as destination to ensure it fails - name: Try with content and directory as destination to ensure it fails
@ -332,7 +332,7 @@
- name: Assert that content and directory as destination failed - name: Assert that content and directory as destination failed
assert: assert:
that: that:
- failed_copy | failed - failed_copy is failed
- "'can not use content with a dir as dest' in failed_copy.msg" - "'can not use content with a dir as dest' in failed_copy.msg"
- name: Clean up - name: Clean up
@ -359,7 +359,7 @@
- name: Assert that the file has changed - name: Assert that the file has changed
assert: assert:
that: that:
- "copy_results|changed" - "copy_results is changed"
- "stat_results.stat.checksum == ('foo.txt\n'|hash('sha1'))" - "stat_results.stat.checksum == ('foo.txt\n'|hash('sha1'))"
- "stat_results.stat.mode == '0500'" - "stat_results.stat.mode == '0500'"
@ -386,7 +386,7 @@
- name: Assert that the file has changed and has correct mode - name: Assert that the file has changed and has correct mode
assert: assert:
that: that:
- "copy_results|changed" - "copy_results is changed"
- "copy_results.mode == '0547'" - "copy_results.mode == '0547'"
- "stat_results.stat.checksum == ('foo.txt\n'|hash('sha1'))" - "stat_results.stat.checksum == ('foo.txt\n'|hash('sha1'))"
- "stat_results.stat.mode == '0547'" - "stat_results.stat.mode == '0547'"
@ -437,7 +437,7 @@
- name: Assert that the recursive copy did something - name: Assert that the recursive copy did something
assert: assert:
that: that:
- "recursive_copy_result|changed" - "recursive_copy_result is changed"
- name: Check that a file in a directory was transferred - name: Check that a file in a directory was transferred
stat: stat:
@ -547,7 +547,7 @@
- name: Assert that the second copy did not change anything - name: Assert that the second copy did not change anything
assert: assert:
that: that:
- "not recursive_copy_result|changed" - "recursive_copy_result is not changed"
- name: Cleanup the recursive copy subdir - name: Cleanup the recursive copy subdir
file: file:
@ -594,7 +594,7 @@
- name: Assert that the recursive copy did something - name: Assert that the recursive copy did something
assert: assert:
that: that:
- "recursive_copy_result|changed" - "recursive_copy_result is changed"
- name: Check that a file in a directory was transferred - name: Check that a file in a directory was transferred
stat: stat:
@ -702,7 +702,7 @@
- name: Assert that the second copy did not change anything - name: Assert that the second copy did not change anything
assert: assert:
that: that:
- "not recursive_copy_result|changed" - "recursive_copy_result is not changed"
- name: Cleanup the recursive copy subdir - name: Cleanup the recursive copy subdir
file: file:
@ -749,7 +749,7 @@
- name: Assert that the recursive copy did something - name: Assert that the recursive copy did something
assert: assert:
that: that:
- "recursive_copy_result|changed" - "recursive_copy_result is changed"
- name: Check that a file in a directory was transferred - name: Check that a file in a directory was transferred
stat: stat:
@ -867,7 +867,7 @@
- name: Assert that the second copy did not change anything - name: Assert that the second copy did not change anything
assert: assert:
that: that:
- "not recursive_copy_result|changed" - "recursive_copy_result is not changed"
- name: Cleanup the recursive copy subdir - name: Cleanup the recursive copy subdir
file: file:
@ -1153,7 +1153,7 @@
- name: Assert that the file has changed and is not a link - name: Assert that the file has changed and is not a link
assert: assert:
that: that:
- "copy_results|changed" - "copy_results is changed"
- "'content' not in copy_results" - "'content' not in copy_results"
- "stat_results.stat.checksum == ('modified'|hash('sha1'))" - "stat_results.stat.checksum == ('modified'|hash('sha1'))"
- "not stat_results.stat.islnk" - "not stat_results.stat.islnk"

@ -5,7 +5,7 @@
- name: verify setup - name: verify setup
assert: assert:
that: that:
- acc|success - acc is successful
- name: test fail if missing name - name: test fail if missing name
action: cs_account action: cs_account
@ -14,7 +14,7 @@
- name: verify results of fail if missing params - name: verify results of fail if missing params
assert: assert:
that: that:
- acc|failed - acc is failed
- 'acc.msg == "missing required arguments: name"' - 'acc.msg == "missing required arguments: name"'
- name: test fail if missing params if state=present - name: test fail if missing params if state=present
@ -25,7 +25,7 @@
- name: verify results of fail if missing params if state=present - name: verify results of fail if missing params if state=present
assert: assert:
that: that:
- acc|failed - acc is failed
- 'acc.msg == "missing required arguments: email, username, password, first_name, last_name"' - 'acc.msg == "missing required arguments: email, username, password, first_name, last_name"'
- name: test create user account in check mode - name: test create user account in check mode
@ -42,8 +42,8 @@
- name: verify results of create account in check mode - name: verify results of create account in check mode
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- name: test create user account - name: test create user account
cs_account: cs_account:
@ -58,8 +58,8 @@
- name: verify results of create account - name: verify results of create account
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -79,8 +79,8 @@
- name: verify results of create account idempotence - name: verify results of create account idempotence
assert: assert:
that: that:
- acc|success - acc is successful
- not acc|changed - acc is not changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -96,8 +96,8 @@
- name: verify results of lock user account in check mode - name: verify results of lock user account in check mode
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -112,8 +112,8 @@
- name: verify results of lock user account - name: verify results of lock user account
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -128,8 +128,8 @@
- name: verify results of lock user account idempotence - name: verify results of lock user account idempotence
assert: assert:
that: that:
- acc|success - acc is successful
- not acc|changed - acc is not changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -145,8 +145,8 @@
- name: verify results of disable user account in check mode - name: verify results of disable user account in check mode
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -161,8 +161,8 @@
- name: verify results of disable user account - name: verify results of disable user account
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -177,8 +177,8 @@
- name: verify results of disable user account idempotence - name: verify results of disable user account idempotence
assert: assert:
that: that:
- acc|success - acc is successful
- not acc|changed - acc is not changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -194,8 +194,8 @@
- name: verify results of lock disabled user account in check mode - name: verify results of lock disabled user account in check mode
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -210,8 +210,8 @@
- name: verify results of lock disabled user account - name: verify results of lock disabled user account
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -226,8 +226,8 @@
- name: verify results of lock disabled user account idempotence - name: verify results of lock disabled user account idempotence
assert: assert:
that: that:
- acc|success - acc is successful
- not acc|changed - acc is not changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -243,8 +243,8 @@
- name: verify results of enable user account in check mode - name: verify results of enable user account in check mode
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -259,8 +259,8 @@
- name: verify results of enable user account - name: verify results of enable user account
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -275,8 +275,8 @@
- name: verify results of enable user account idempotence - name: verify results of enable user account idempotence
assert: assert:
that: that:
- acc|success - acc is successful
- not acc|changed - acc is not changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -292,8 +292,8 @@
- name: verify results of remove user account in check mode - name: verify results of remove user account in check mode
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -308,8 +308,8 @@
- name: verify results of remove user account - name: verify results of remove user account
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -324,8 +324,8 @@
- name: verify results of remove user account idempotence - name: verify results of remove user account idempotence
assert: assert:
that: that:
- acc|success - acc is successful
- not acc|changed - acc is not changed
- name: test create user disabled account - name: test create user disabled account
cs_account: cs_account:
@ -341,8 +341,8 @@
- name: verify results of create disabled account - name: verify results of create disabled account
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -357,8 +357,8 @@
- name: verify results of remove disabled user account - name: verify results of remove disabled user account
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -379,8 +379,8 @@
- name: verify results of create locked account - name: verify results of create locked account
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -395,8 +395,8 @@
- name: verify results of remove locked user account - name: verify results of remove locked user account
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -417,8 +417,8 @@
- name: verify results of create unlocked/enabled account - name: verify results of create unlocked/enabled account
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
@ -433,8 +433,8 @@
- name: verify results of remove unlocked/enabled user account - name: verify results of remove unlocked/enabled user account
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- acc.name == "{{ cs_resource_prefix }}_user" - acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"

@ -7,7 +7,7 @@
- name: verify setup - name: verify setup
assert: assert:
that: that:
- ag|success - ag is successful
- name: test fail if missing name - name: test fail if missing name
cs_affinitygroup: cs_affinitygroup:
@ -16,7 +16,7 @@
- name: verify results of fail if missing name - name: verify results of fail if missing name
assert: assert:
that: that:
- ag|failed - ag is failed
- "ag.msg == 'missing required arguments: name'" - "ag.msg == 'missing required arguments: name'"
- name: test fail unknown affinity type - name: test fail unknown affinity type
@ -28,7 +28,7 @@
- name: verify test fail unknown affinity type - name: verify test fail unknown affinity type
assert: assert:
that: that:
- ag|failed - ag is failed
- "ag.msg == 'affinity group type not found: unexistent affinity type'" - "ag.msg == 'affinity group type not found: unexistent affinity type'"
- name: test present affinity group in check mode - name: test present affinity group in check mode
@ -38,8 +38,8 @@
- name: verify results of create affinity group in check mode - name: verify results of create affinity group in check mode
assert: assert:
that: that:
- ag|success - ag is successful
- ag|changed - ag is changed
- name: test present affinity group - name: test present affinity group
cs_affinitygroup: name={{ cs_resource_prefix }}_ag cs_affinitygroup: name={{ cs_resource_prefix }}_ag
@ -47,8 +47,8 @@
- name: verify results of create affinity group - name: verify results of create affinity group
assert: assert:
that: that:
- ag|success - ag is successful
- ag|changed - ag is changed
- ag.name == "{{ cs_resource_prefix }}_ag" - ag.name == "{{ cs_resource_prefix }}_ag"
- name: test present affinity group is idempotence - name: test present affinity group is idempotence
@ -57,8 +57,8 @@
- name: verify results present affinity group is idempotence - name: verify results present affinity group is idempotence
assert: assert:
that: that:
- ag|success - ag is successful
- not ag|changed - ag is not changed
- ag.name == "{{ cs_resource_prefix }}_ag" - ag.name == "{{ cs_resource_prefix }}_ag"
- name: test absent affinity group in check mode - name: test absent affinity group in check mode
@ -68,8 +68,8 @@
- name: verify results of absent affinity group in check mode - name: verify results of absent affinity group in check mode
assert: assert:
that: that:
- ag|success - ag is successful
- ag|changed - ag is changed
- ag.name == "{{ cs_resource_prefix }}_ag" - ag.name == "{{ cs_resource_prefix }}_ag"
- name: test absent affinity group - name: test absent affinity group
@ -78,8 +78,8 @@
- name: verify results of absent affinity group - name: verify results of absent affinity group
assert: assert:
that: that:
- ag|success - ag is successful
- ag|changed - ag is changed
- ag.name == "{{ cs_resource_prefix }}_ag" - ag.name == "{{ cs_resource_prefix }}_ag"
- name: test absent affinity group is idempotence - name: test absent affinity group is idempotence
@ -88,6 +88,6 @@
- name: verify results of absent affinity group is idempotence - name: verify results of absent affinity group is idempotence
assert: assert:
that: that:
- ag|success - ag is successful
- not ag|changed - ag is not changed
- ag.name is undefined - ag.name is undefined

@ -7,7 +7,7 @@
- name: verify setup cluster is absent - name: verify setup cluster is absent
assert: assert:
that: that:
- cluster|success - cluster is successful
- name: setup zone is present - name: setup zone is present
cs_zone: cs_zone:
@ -19,7 +19,7 @@
- name: verify setup zone is present - name: verify setup zone is present
assert: assert:
that: that:
- zone|success - zone is successful
- name: setup pod is present - name: setup pod is present
cs_pod: cs_pod:
@ -32,7 +32,7 @@
- name: verify setup pod is present - name: verify setup pod is present
assert: assert:
that: that:
- pod|success - pod is successful
- name: test fail if missing name - name: test fail if missing name
cs_cluster: cs_cluster:
@ -41,7 +41,7 @@
- name: verify results of fail if missing name - name: verify results of fail if missing name
assert: assert:
that: that:
- cluster|failed - cluster is failed
- "cluster.msg == 'missing required arguments: name'" - "cluster.msg == 'missing required arguments: name'"
- name: test fail if pod not found - name: test fail if pod not found
@ -56,7 +56,7 @@
- name: verify results of fail if missing name - name: verify results of fail if missing name
assert: assert:
that: that:
- cluster|failed - cluster is failed
- "cluster.msg == 'Pod unexistent not found in zone {{ cs_resource_prefix }}-zone'" - "cluster.msg == 'Pod unexistent not found in zone {{ cs_resource_prefix }}-zone'"
- name: test create cluster in check mode - name: test create cluster in check mode
@ -71,7 +71,7 @@
- name: verify test create cluster in check mode - name: verify test create cluster in check mode
assert: assert:
that: that:
- cluster_origin|changed - cluster_origin is changed
- name: test create cluster - name: test create cluster
cs_cluster: cs_cluster:
@ -84,7 +84,7 @@
- name: verify test create cluster - name: verify test create cluster
assert: assert:
that: that:
- cluster_origin|changed - cluster_origin is changed
- cluster_origin.name == "{{ cs_resource_prefix }}-cluster" - cluster_origin.name == "{{ cs_resource_prefix }}-cluster"
- cluster_origin.zone == "{{ cs_resource_prefix }}-zone" - cluster_origin.zone == "{{ cs_resource_prefix }}-zone"
- cluster_origin.allocation_state == "Enabled" - cluster_origin.allocation_state == "Enabled"
@ -102,7 +102,7 @@
assert: assert:
that: that:
- cluster.id == cluster_origin.id - cluster.id == cluster_origin.id
- not cluster|changed - cluster is not changed
- cluster.name == "{{ cs_resource_prefix }}-cluster" - cluster.name == "{{ cs_resource_prefix }}-cluster"
- cluster.zone == "{{ cs_resource_prefix }}-zone" - cluster.zone == "{{ cs_resource_prefix }}-zone"
- cluster.allocation_state == "Enabled" - cluster.allocation_state == "Enabled"
@ -120,7 +120,7 @@
- name: verify test update cluster in check mode - name: verify test update cluster in check mode
assert: assert:
that: that:
- cluster|changed - cluster is changed
- cluster.name == "{{ cs_resource_prefix }}-cluster" - cluster.name == "{{ cs_resource_prefix }}-cluster"
- cluster.zone == "{{ cs_resource_prefix }}-zone" - cluster.zone == "{{ cs_resource_prefix }}-zone"
- cluster.allocation_state == "Enabled" - cluster.allocation_state == "Enabled"
@ -138,7 +138,7 @@
- name: verify test update cluster - name: verify test update cluster
assert: assert:
that: that:
- cluster|changed - cluster is changed
- cluster.name == "{{ cs_resource_prefix }}-cluster" - cluster.name == "{{ cs_resource_prefix }}-cluster"
- cluster.zone == "{{ cs_resource_prefix }}-zone" - cluster.zone == "{{ cs_resource_prefix }}-zone"
- cluster.allocation_state == "Enabled" - cluster.allocation_state == "Enabled"
@ -156,7 +156,7 @@
- name: verify test update cluster idempotence - name: verify test update cluster idempotence
assert: assert:
that: that:
- not cluster|changed - cluster is not changed
- cluster.name == "{{ cs_resource_prefix }}-cluster" - cluster.name == "{{ cs_resource_prefix }}-cluster"
- cluster.zone == "{{ cs_resource_prefix }}-zone" - cluster.zone == "{{ cs_resource_prefix }}-zone"
- cluster.allocation_state == "Enabled" - cluster.allocation_state == "Enabled"
@ -173,7 +173,7 @@
- name: verify test disable cluster in check mode - name: verify test disable cluster in check mode
assert: assert:
that: that:
- cluster|changed - cluster is changed
- cluster.name == "{{ cs_resource_prefix }}-cluster" - cluster.name == "{{ cs_resource_prefix }}-cluster"
- cluster.zone == "{{ cs_resource_prefix }}-zone" - cluster.zone == "{{ cs_resource_prefix }}-zone"
- cluster.allocation_state == "Enabled" - cluster.allocation_state == "Enabled"
@ -189,7 +189,7 @@
- name: verify test disable cluster - name: verify test disable cluster
assert: assert:
that: that:
- cluster|changed - cluster is changed
- cluster.name == "{{ cs_resource_prefix }}-cluster" - cluster.name == "{{ cs_resource_prefix }}-cluster"
- cluster.zone == "{{ cs_resource_prefix }}-zone" - cluster.zone == "{{ cs_resource_prefix }}-zone"
- cluster.allocation_state == "Disabled" - cluster.allocation_state == "Disabled"
@ -205,7 +205,7 @@
- name: verify test disable cluster idempotence - name: verify test disable cluster idempotence
assert: assert:
that: that:
- not cluster|changed - cluster is not changed
- cluster.name == "{{ cs_resource_prefix }}-cluster" - cluster.name == "{{ cs_resource_prefix }}-cluster"
- cluster.zone == "{{ cs_resource_prefix }}-zone" - cluster.zone == "{{ cs_resource_prefix }}-zone"
- cluster.allocation_state == "Disabled" - cluster.allocation_state == "Disabled"
@ -221,7 +221,7 @@
- name: verify test enable cluster in check mode - name: verify test enable cluster in check mode
assert: assert:
that: that:
- cluster|changed - cluster is changed
- cluster.name == "{{ cs_resource_prefix }}-cluster" - cluster.name == "{{ cs_resource_prefix }}-cluster"
- cluster.zone == "{{ cs_resource_prefix }}-zone" - cluster.zone == "{{ cs_resource_prefix }}-zone"
- cluster.allocation_state == "Disabled" - cluster.allocation_state == "Disabled"
@ -237,7 +237,7 @@
- name: verify test enable cluster - name: verify test enable cluster
assert: assert:
that: that:
- cluster|changed - cluster is changed
- cluster.name == "{{ cs_resource_prefix }}-cluster" - cluster.name == "{{ cs_resource_prefix }}-cluster"
- cluster.zone == "{{ cs_resource_prefix }}-zone" - cluster.zone == "{{ cs_resource_prefix }}-zone"
- cluster.allocation_state == "Enabled" - cluster.allocation_state == "Enabled"
@ -253,7 +253,7 @@
- name: verify test enable cluster idempotence - name: verify test enable cluster idempotence
assert: assert:
that: that:
- not cluster|changed - cluster is not changed
- cluster.name == "{{ cs_resource_prefix }}-cluster" - cluster.name == "{{ cs_resource_prefix }}-cluster"
- cluster.zone == "{{ cs_resource_prefix }}-zone" - cluster.zone == "{{ cs_resource_prefix }}-zone"
- cluster.allocation_state == "Enabled" - cluster.allocation_state == "Enabled"
@ -272,7 +272,7 @@
assert: assert:
that: that:
- cluster.id == cluster_origin.id - cluster.id == cluster_origin.id
- cluster|changed - cluster is changed
- cluster.name == "{{ cs_resource_prefix }}-cluster" - cluster.name == "{{ cs_resource_prefix }}-cluster"
- cluster.zone == "{{ cs_resource_prefix }}-zone" - cluster.zone == "{{ cs_resource_prefix }}-zone"
- cluster.allocation_state == "Enabled" - cluster.allocation_state == "Enabled"
@ -288,7 +288,7 @@
assert: assert:
that: that:
- cluster.id == cluster_origin.id - cluster.id == cluster_origin.id
- cluster|changed - cluster is changed
- cluster.name == "{{ cs_resource_prefix }}-cluster" - cluster.name == "{{ cs_resource_prefix }}-cluster"
- cluster.zone == "{{ cs_resource_prefix }}-zone" - cluster.zone == "{{ cs_resource_prefix }}-zone"
- cluster.allocation_state == "Enabled" - cluster.allocation_state == "Enabled"
@ -303,4 +303,4 @@
- name: verify test remove cluster idempotence - name: verify test remove cluster idempotence
assert: assert:
that: that:
- not cluster|changed - cluster is not changed

@ -8,7 +8,7 @@
- name: verify test configuration storage - name: verify test configuration storage
assert: assert:
that: that:
- config|success - config is successful
- name: test update configuration account in check mode - name: test update configuration account in check mode
cs_configuration: cs_configuration:
@ -20,8 +20,8 @@
- name: verify update configuration account in check mode - name: verify update configuration account in check mode
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "true" - config.value == "true"
- config.name == "allow.public.user.templates" - config.name == "allow.public.user.templates"
- config.scope == "account" - config.scope == "account"
@ -36,8 +36,8 @@
- name: verify update configuration account - name: verify update configuration account
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "false" - config.value == "false"
- config.name == "allow.public.user.templates" - config.name == "allow.public.user.templates"
- config.scope == "account" - config.scope == "account"
@ -52,8 +52,8 @@
- name: verify update configuration account idempotence - name: verify update configuration account idempotence
assert: assert:
that: that:
- config|success - config is successful
- not config|changed - config is not changed
- config.value == "false" - config.value == "false"
- config.name == "allow.public.user.templates" - config.name == "allow.public.user.templates"
- config.scope == "account" - config.scope == "account"
@ -68,8 +68,8 @@
- name: verify update configuration account - name: verify update configuration account
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "true" - config.value == "true"
- config.name == "allow.public.user.templates" - config.name == "allow.public.user.templates"
- config.scope == "account" - config.scope == "account"

@ -8,7 +8,7 @@
- name: verify test configuration cluster - name: verify test configuration cluster
assert: assert:
that: that:
- config|success - config is successful
- name: test update configuration cluster in check mode - name: test update configuration cluster in check mode
cs_configuration: cs_configuration:
@ -20,8 +20,8 @@
- name: verify update configuration cluster in check mode - name: verify update configuration cluster in check mode
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "1.0" - config.value == "1.0"
- config.name == "cpu.overprovisioning.factor" - config.name == "cpu.overprovisioning.factor"
- config.scope == "cluster" - config.scope == "cluster"
@ -36,8 +36,8 @@
- name: verify update configuration cluster - name: verify update configuration cluster
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "2.0" - config.value == "2.0"
- config.name == "cpu.overprovisioning.factor" - config.name == "cpu.overprovisioning.factor"
- config.scope == "cluster" - config.scope == "cluster"
@ -52,8 +52,8 @@
- name: verify update configuration cluster idempotence - name: verify update configuration cluster idempotence
assert: assert:
that: that:
- config|success - config is successful
- not config|changed - config is not changed
- config.value == "2.0" - config.value == "2.0"
- config.name == "cpu.overprovisioning.factor" - config.name == "cpu.overprovisioning.factor"
- config.scope == "cluster" - config.scope == "cluster"
@ -68,8 +68,8 @@
- name: verify reset configuration cluster - name: verify reset configuration cluster
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "1.0" - config.value == "1.0"
- config.name == "cpu.overprovisioning.factor" - config.name == "cpu.overprovisioning.factor"
- config.scope == "cluster" - config.scope == "cluster"

@ -6,7 +6,7 @@
- name: verify results of fail if missing arguments - name: verify results of fail if missing arguments
assert: assert:
that: that:
- config|failed - config is failed
- "config.msg.startswith('missing required arguments: ')" - "config.msg.startswith('missing required arguments: ')"
- name: test configuration - name: test configuration
@ -17,7 +17,7 @@
- name: verify test configuration - name: verify test configuration
assert: assert:
that: that:
- config|success - config is successful
- name: test update configuration string in check mode - name: test update configuration string in check mode
cs_configuration: cs_configuration:
@ -28,8 +28,8 @@
- name: verify test update configuration string in check mode - name: verify test update configuration string in check mode
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "global" - config.value == "global"
- config.name == "network.loadbalancer.haproxy.stats.visibility" - config.name == "network.loadbalancer.haproxy.stats.visibility"
@ -41,8 +41,8 @@
- name: verify test update configuration string - name: verify test update configuration string
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "all" - config.value == "all"
- config.name == "network.loadbalancer.haproxy.stats.visibility" - config.name == "network.loadbalancer.haproxy.stats.visibility"
@ -54,8 +54,8 @@
- name: verify test update configuration string idempotence - name: verify test update configuration string idempotence
assert: assert:
that: that:
- config|success - config is successful
- not config|changed - config is not changed
- config.value == "all" - config.value == "all"
- config.name == "network.loadbalancer.haproxy.stats.visibility" - config.name == "network.loadbalancer.haproxy.stats.visibility"
@ -67,8 +67,8 @@
- name: verify test reset configuration string - name: verify test reset configuration string
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "global" - config.value == "global"
- config.name == "network.loadbalancer.haproxy.stats.visibility" - config.name == "network.loadbalancer.haproxy.stats.visibility"
@ -80,7 +80,7 @@
- name: verify test configuration - name: verify test configuration
assert: assert:
that: that:
- config|success - config is successful
- name: test update configuration bool in check mode - name: test update configuration bool in check mode
cs_configuration: cs_configuration:
@ -91,8 +91,8 @@
- name: verify test update configuration bool in check mode - name: verify test update configuration bool in check mode
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "false" - config.value == "false"
- config.name == "vmware.recycle.hung.wokervm" - config.name == "vmware.recycle.hung.wokervm"
@ -104,8 +104,8 @@
- name: verify test update configuration bool - name: verify test update configuration bool
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "true" - config.value == "true"
- config.name == "vmware.recycle.hung.wokervm" - config.name == "vmware.recycle.hung.wokervm"
@ -117,8 +117,8 @@
- name: verify test update configuration bool idempotence - name: verify test update configuration bool idempotence
assert: assert:
that: that:
- config|success - config is successful
- not config|changed - config is not changed
- config.value == "true" - config.value == "true"
- config.name == "vmware.recycle.hung.wokervm" - config.name == "vmware.recycle.hung.wokervm"
@ -130,8 +130,8 @@
- name: verify test reset configuration bool - name: verify test reset configuration bool
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "false" - config.value == "false"
- config.name == "vmware.recycle.hung.wokervm" - config.name == "vmware.recycle.hung.wokervm"
@ -143,7 +143,7 @@
- name: verify test configuration - name: verify test configuration
assert: assert:
that: that:
- config|success - config is successful
- name: test update configuration float in check mode - name: test update configuration float in check mode
cs_configuration: cs_configuration:
@ -154,8 +154,8 @@
- name: verify update configuration float in check mode - name: verify update configuration float in check mode
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "0.7" - config.value == "0.7"
- config.name == "agent.load.threshold" - config.name == "agent.load.threshold"
@ -167,8 +167,8 @@
- name: verify update configuration float - name: verify update configuration float
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "0.81" - config.value == "0.81"
- config.name == "agent.load.threshold" - config.name == "agent.load.threshold"
@ -180,8 +180,8 @@
- name: verify update configuration float idempotence - name: verify update configuration float idempotence
assert: assert:
that: that:
- config|success - config is successful
- not config|changed - config is not changed
- config.value == "0.81" - config.value == "0.81"
- config.name == "agent.load.threshold" - config.name == "agent.load.threshold"
@ -193,8 +193,8 @@
- name: verify reset configuration float - name: verify reset configuration float
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "0.7" - config.value == "0.7"
- config.name == "agent.load.threshold" - config.name == "agent.load.threshold"

@ -8,7 +8,7 @@
- name: verify test configuration storage - name: verify test configuration storage
assert: assert:
that: that:
- config|success - config is successful
- name: test update configuration storage in check mode - name: test update configuration storage in check mode
cs_configuration: cs_configuration:
@ -20,8 +20,8 @@
- name: verify update configuration storage in check mode - name: verify update configuration storage in check mode
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "2.0" - config.value == "2.0"
- config.name == "storage.overprovisioning.factor" - config.name == "storage.overprovisioning.factor"
- config.scope == "storagepool" - config.scope == "storagepool"
@ -36,8 +36,8 @@
- name: verify update configuration storage - name: verify update configuration storage
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "3.0" - config.value == "3.0"
- config.name == "storage.overprovisioning.factor" - config.name == "storage.overprovisioning.factor"
- config.scope == "storagepool" - config.scope == "storagepool"
@ -52,8 +52,8 @@
- name: verify update configuration storage idempotence - name: verify update configuration storage idempotence
assert: assert:
that: that:
- config|success - config is successful
- not config|changed - config is not changed
- config.value == "3.0" - config.value == "3.0"
- config.name == "storage.overprovisioning.factor" - config.name == "storage.overprovisioning.factor"
- config.scope == "storagepool" - config.scope == "storagepool"
@ -68,8 +68,8 @@
- name: verify reset configuration storage - name: verify reset configuration storage
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "2.0" - config.value == "2.0"
- config.name == "storage.overprovisioning.factor" - config.name == "storage.overprovisioning.factor"
- config.scope == "storagepool" - config.scope == "storagepool"

@ -8,7 +8,7 @@
- name: verify test configuration zone - name: verify test configuration zone
assert: assert:
that: that:
- config|success - config is successful
- name: test update configuration zone - name: test update configuration zone
cs_configuration: cs_configuration:
@ -19,8 +19,8 @@
- name: verify update configuration zone - name: verify update configuration zone
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "true" - config.value == "true"
- config.name == "use.external.dns" - config.name == "use.external.dns"
- config.scope == "zone" - config.scope == "zone"
@ -35,8 +35,8 @@
- name: verify update configuration zone idempotence - name: verify update configuration zone idempotence
assert: assert:
that: that:
- config|success - config is successful
- not config|changed - config is not changed
- config.value == "true" - config.value == "true"
- config.name == "use.external.dns" - config.name == "use.external.dns"
- config.scope == "zone" - config.scope == "zone"
@ -51,8 +51,8 @@
- name: verify reset configuration zone - name: verify reset configuration zone
assert: assert:
that: that:
- config|success - config is successful
- config|changed - config is changed
- config.value == "false" - config.value == "false"
- config.name == "use.external.dns" - config.name == "use.external.dns"
- config.scope == "zone" - config.scope == "zone"

@ -7,7 +7,7 @@
- name: verify setup - name: verify setup
assert: assert:
that: that:
- dom|success - dom is successful
- name: test fail if missing name - name: test fail if missing name
action: cs_domain action: cs_domain
@ -16,7 +16,7 @@
- name: verify results of fail if missing params - name: verify results of fail if missing params
assert: assert:
that: that:
- dom|failed - dom is failed
- 'dom.msg == "missing required arguments: path"' - 'dom.msg == "missing required arguments: path"'
- name: test fail if ends with / - name: test fail if ends with /
@ -27,7 +27,7 @@
- name: verify results of fail if ends with / - name: verify results of fail if ends with /
assert: assert:
that: that:
- dom|failed - dom is failed
- dom.msg == "Path '{{ cs_resource_prefix }}_domain/' must not end with /" - dom.msg == "Path '{{ cs_resource_prefix }}_domain/' must not end with /"
- name: test create a domain in check mode - name: test create a domain in check mode
@ -38,7 +38,7 @@
- name: verify results of test create a domain in check mode - name: verify results of test create a domain in check mode
assert: assert:
that: that:
- dom|changed - dom is changed
- name: test create a domain - name: test create a domain
cs_domain: cs_domain:
@ -47,7 +47,7 @@
- name: verify results of test create a domain - name: verify results of test create a domain
assert: assert:
that: that:
- dom|changed - dom is changed
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain" - dom.path == "ROOT/{{ cs_resource_prefix }}_domain"
- dom.name == "{{ cs_resource_prefix }}_domain" - dom.name == "{{ cs_resource_prefix }}_domain"
@ -58,7 +58,7 @@
- name: verify results of test create a domain idempotence - name: verify results of test create a domain idempotence
assert: assert:
that: that:
- not dom|changed - dom is not changed
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain" - dom.path == "ROOT/{{ cs_resource_prefix }}_domain"
- dom.name == "{{ cs_resource_prefix }}_domain" - dom.name == "{{ cs_resource_prefix }}_domain"
@ -69,7 +69,7 @@
- name: verify results of test create a domain idempotence2 - name: verify results of test create a domain idempotence2
assert: assert:
that: that:
- not dom|changed - dom is not changed
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain" - dom.path == "ROOT/{{ cs_resource_prefix }}_domain"
- dom.name == "{{ cs_resource_prefix }}_domain" - dom.name == "{{ cs_resource_prefix }}_domain"
@ -81,7 +81,7 @@
- name: test fail to create a subdomain for inexistent domain - name: test fail to create a subdomain for inexistent domain
assert: assert:
that: that:
- dom|failed - dom is failed
- dom.msg == "Parent domain path ROOT/inexistent does not exist" - dom.msg == "Parent domain path ROOT/inexistent does not exist"
- name: test create a subdomain in check mode - name: test create a subdomain in check mode
@ -92,7 +92,7 @@
- name: verify results of test create a domain in check mode - name: verify results of test create a domain in check mode
assert: assert:
that: that:
- dom|changed - dom is changed
- name: test create a subdomain - name: test create a subdomain
cs_domain: cs_domain:
@ -101,7 +101,7 @@
- name: verify results of test create a domain - name: verify results of test create a domain
assert: assert:
that: that:
- dom|changed - dom is changed
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain" - dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
- dom.name == "{{ cs_resource_prefix }}_subdomain" - dom.name == "{{ cs_resource_prefix }}_subdomain"
@ -112,7 +112,7 @@
- name: verify results of test create a subdomain idempotence - name: verify results of test create a subdomain idempotence
assert: assert:
that: that:
- not dom|changed - dom is not changed
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain" - dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
- dom.name == "{{ cs_resource_prefix }}_subdomain" - dom.name == "{{ cs_resource_prefix }}_subdomain"
@ -125,7 +125,7 @@
- name: verify results of test update a subdomain in check mode - name: verify results of test update a subdomain in check mode
assert: assert:
that: that:
- dom|changed - dom is changed
- dom.network_domain is undefined - dom.network_domain is undefined
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain" - dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
- dom.name == "{{ cs_resource_prefix }}_subdomain" - dom.name == "{{ cs_resource_prefix }}_subdomain"
@ -138,7 +138,7 @@
- name: verify results of test update a subdomain - name: verify results of test update a subdomain
assert: assert:
that: that:
- dom|changed - dom is changed
- dom.network_domain == "domain.example.com" - dom.network_domain == "domain.example.com"
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain" - dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
- dom.name == "{{ cs_resource_prefix }}_subdomain" - dom.name == "{{ cs_resource_prefix }}_subdomain"
@ -151,7 +151,7 @@
- name: verify results of test update a subdomain idempotence - name: verify results of test update a subdomain idempotence
assert: assert:
that: that:
- not dom|changed - dom is not changed
- dom.network_domain == "domain.example.com" - dom.network_domain == "domain.example.com"
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain" - dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
- dom.name == "{{ cs_resource_prefix }}_subdomain" - dom.name == "{{ cs_resource_prefix }}_subdomain"
@ -165,7 +165,7 @@
- name: verify results of test delete a subdomain in check mode - name: verify results of test delete a subdomain in check mode
assert: assert:
that: that:
- dom|changed - dom is changed
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain" - dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
- dom.name == "{{ cs_resource_prefix }}_subdomain" - dom.name == "{{ cs_resource_prefix }}_subdomain"
@ -177,7 +177,7 @@
- name: verify results of test delete a subdomain - name: verify results of test delete a subdomain
assert: assert:
that: that:
- dom|changed - dom is changed
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain" - dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
- dom.name == "{{ cs_resource_prefix }}_subdomain" - dom.name == "{{ cs_resource_prefix }}_subdomain"
@ -189,7 +189,7 @@
- name: verify results of test delete a subdomain idempotence - name: verify results of test delete a subdomain idempotence
assert: assert:
that: that:
- not dom|changed - dom is not changed
- name: test create a subdomain 2 - name: test create a subdomain 2
cs_domain: cs_domain:
@ -198,7 +198,7 @@
- name: verify results of test create a subdomain 2 - name: verify results of test create a subdomain 2
assert: assert:
that: that:
- dom|changed - dom is changed
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain" - dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
- dom.name == "{{ cs_resource_prefix }}_subdomain" - dom.name == "{{ cs_resource_prefix }}_subdomain"
@ -212,7 +212,7 @@
- name: verify results of test delete a domain with clean up in check mode - name: verify results of test delete a domain with clean up in check mode
assert: assert:
that: that:
- dom|changed - dom is changed
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain" - dom.path == "ROOT/{{ cs_resource_prefix }}_domain"
- dom.name == "{{ cs_resource_prefix }}_domain" - dom.name == "{{ cs_resource_prefix }}_domain"
@ -225,7 +225,7 @@
- name: verify results of test delete a domain with clean up - name: verify results of test delete a domain with clean up
assert: assert:
that: that:
- dom|changed - dom is changed
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain" - dom.path == "ROOT/{{ cs_resource_prefix }}_domain"
- dom.name == "{{ cs_resource_prefix }}_domain" - dom.name == "{{ cs_resource_prefix }}_domain"
@ -238,4 +238,4 @@
- name: verify results of test delete a domain with clean up idempotence - name: verify results of test delete a domain with clean up idempotence
assert: assert:
that: that:
- not dom|changed - dom is not changed

@ -9,7 +9,7 @@
- name: verify network setup - name: verify network setup
assert: assert:
that: that:
- net|success - net is successful
- name: public ip address setup - name: public ip address setup
cs_ip_address: cs_ip_address:
@ -19,7 +19,7 @@
- name: verify public ip address setup - name: verify public ip address setup
assert: assert:
that: that:
- ip_address|success - ip_address is successful
- name: set ip address as fact - name: set ip address as fact
set_fact: set_fact:
@ -35,7 +35,7 @@
- name: verify setup - name: verify setup
assert: assert:
that: that:
- fw|success - fw is successful
- name: setup 5300 - name: setup 5300
cs_firewall: cs_firewall:
@ -52,7 +52,7 @@
- name: verify setup - name: verify setup
assert: assert:
that: that:
- fw|success - fw is successful
- name: setup all - name: setup all
cs_firewall: cs_firewall:
@ -65,7 +65,7 @@
- name: verify setup - name: verify setup
assert: assert:
that: that:
- fw|success - fw is successful
- name: test fail if missing params - name: test fail if missing params
action: cs_firewall action: cs_firewall
@ -74,7 +74,7 @@
- name: verify results of fail if missing params - name: verify results of fail if missing params
assert: assert:
that: that:
- fw|failed - fw is failed
- "fw.msg == 'one of the following is required: ip_address, network'" - "fw.msg == 'one of the following is required: ip_address, network'"
- name: test fail if missing params - name: test fail if missing params
@ -86,7 +86,7 @@
- name: verify results of fail if missing params - name: verify results of fail if missing params
assert: assert:
that: that:
- fw|failed - fw is failed
- "fw.msg == \"missing required argument for protocol 'tcp': start_port or end_port\"" - "fw.msg == \"missing required argument for protocol 'tcp': start_port or end_port\""
- name: test fail if missing params network egress - name: test fail if missing params network egress
@ -98,7 +98,7 @@
- name: verify results of fail if missing params ip_address - name: verify results of fail if missing params ip_address
assert: assert:
that: that:
- fw|failed - fw is failed
- "fw.msg == 'one of the following is required: ip_address, network'" - "fw.msg == 'one of the following is required: ip_address, network'"
- name: test present firewall rule ingress 80 in check mode - name: test present firewall rule ingress 80 in check mode
@ -111,8 +111,8 @@
- name: verify results of present firewall rule ingress 80 in check mode - name: verify results of present firewall rule ingress 80 in check mode
assert: assert:
that: that:
- fw|success - fw is successful
- fw|changed - fw is changed
- name: test present firewall rule ingress 80 - name: test present firewall rule ingress 80
cs_firewall: cs_firewall:
@ -123,8 +123,8 @@
- name: verify results of present firewall rule ingress 80 - name: verify results of present firewall rule ingress 80
assert: assert:
that: that:
- fw|success - fw is successful
- fw|changed - fw is changed
- fw.cidr == "0.0.0.0/0" - fw.cidr == "0.0.0.0/0"
- fw.cidrs == [ '0.0.0.0/0' ] - fw.cidrs == [ '0.0.0.0/0' ]
- fw.ip_address == "{{ cs_firewall_ip_address }}" - fw.ip_address == "{{ cs_firewall_ip_address }}"
@ -142,8 +142,8 @@
- name: verify results of present firewall rule ingress 80 idempotence - name: verify results of present firewall rule ingress 80 idempotence
assert: assert:
that: that:
- fw|success - fw is successful
- not fw|changed - fw is not changed
- fw.cidr == "0.0.0.0/0" - fw.cidr == "0.0.0.0/0"
- fw.cidrs == [ '0.0.0.0/0' ] - fw.cidrs == [ '0.0.0.0/0' ]
- fw.ip_address == "{{ cs_firewall_ip_address }}" - fw.ip_address == "{{ cs_firewall_ip_address }}"
@ -167,8 +167,8 @@
- name: verify results of present firewall rule ingress 5300 in check mode - name: verify results of present firewall rule ingress 5300 in check mode
assert: assert:
that: that:
- fw|success - fw is successful
- fw|changed - fw is changed
- name: test present firewall rule ingress 5300 - name: test present firewall rule ingress 5300
cs_firewall: cs_firewall:
@ -184,8 +184,8 @@
- name: verify results of present firewall rule ingress 5300 - name: verify results of present firewall rule ingress 5300
assert: assert:
that: that:
- fw|success - fw is successful
- fw|changed - fw is changed
- fw.cidr == "1.2.3.0/24,4.5.6.0/24" - fw.cidr == "1.2.3.0/24,4.5.6.0/24"
- fw.cidrs == [ '1.2.3.0/24', '4.5.6.0/24' ] - fw.cidrs == [ '1.2.3.0/24', '4.5.6.0/24' ]
- fw.ip_address == "{{ cs_firewall_ip_address }}" - fw.ip_address == "{{ cs_firewall_ip_address }}"
@ -208,8 +208,8 @@
- name: verify results of present firewall rule ingress 5300 idempotence - name: verify results of present firewall rule ingress 5300 idempotence
assert: assert:
that: that:
- fw|success - fw is successful
- not fw|changed - fw is not changed
- fw.cidr == "1.2.3.0/24,4.5.6.0/24" - fw.cidr == "1.2.3.0/24,4.5.6.0/24"
- fw.cidrs == [ '1.2.3.0/24', '4.5.6.0/24' ] - fw.cidrs == [ '1.2.3.0/24', '4.5.6.0/24' ]
- fw.ip_address == "{{ cs_firewall_ip_address }}" - fw.ip_address == "{{ cs_firewall_ip_address }}"
@ -229,8 +229,8 @@
- name: verify results of present firewall rule egress all in check mode - name: verify results of present firewall rule egress all in check mode
assert: assert:
that: that:
- fw|success - fw is successful
- fw|changed - fw is changed
- name: test present firewall rule egress all - name: test present firewall rule egress all
cs_firewall: cs_firewall:
@ -242,8 +242,8 @@
- name: verify results of present firewall rule egress all - name: verify results of present firewall rule egress all
assert: assert:
that: that:
- fw|success - fw is successful
- fw|changed - fw is changed
- fw.cidr == "0.0.0.0/0" - fw.cidr == "0.0.0.0/0"
- fw.cidrs == [ '0.0.0.0/0' ] - fw.cidrs == [ '0.0.0.0/0' ]
- fw.network == "{{ cs_firewall_network }}" - fw.network == "{{ cs_firewall_network }}"
@ -260,8 +260,8 @@
- name: verify results of present firewall rule egress all idempotence - name: verify results of present firewall rule egress all idempotence
assert: assert:
that: that:
- fw|success - fw is successful
- not fw|changed - fw is not changed
- fw.cidr == "0.0.0.0/0" - fw.cidr == "0.0.0.0/0"
- fw.network == "{{ cs_firewall_network }}" - fw.network == "{{ cs_firewall_network }}"
- fw.protocol == "all" - fw.protocol == "all"
@ -278,8 +278,8 @@
- name: verify results of absent firewall rule ingress 80 in check mode - name: verify results of absent firewall rule ingress 80 in check mode
assert: assert:
that: that:
- fw|success - fw is successful
- fw|changed - fw is changed
- fw.cidr == "0.0.0.0/0" - fw.cidr == "0.0.0.0/0"
- fw.cidrs == [ '0.0.0.0/0' ] - fw.cidrs == [ '0.0.0.0/0' ]
- fw.ip_address == "{{ cs_firewall_ip_address }}" - fw.ip_address == "{{ cs_firewall_ip_address }}"
@ -298,8 +298,8 @@
- name: verify results of absent firewall rule ingress 80 - name: verify results of absent firewall rule ingress 80
assert: assert:
that: that:
- fw|success - fw is successful
- fw|changed - fw is changed
- fw.cidr == "0.0.0.0/0" - fw.cidr == "0.0.0.0/0"
- fw.cidrs == [ '0.0.0.0/0' ] - fw.cidrs == [ '0.0.0.0/0' ]
- fw.ip_address == "{{ cs_firewall_ip_address }}" - fw.ip_address == "{{ cs_firewall_ip_address }}"
@ -318,8 +318,8 @@
- name: verify results of absent firewall rule ingress 80 idempotence - name: verify results of absent firewall rule ingress 80 idempotence
assert: assert:
that: that:
- fw|success - fw is successful
- not fw|changed - fw is not changed
- name: test absent firewall rule ingress 5300 in check mode - name: test absent firewall rule ingress 5300 in check mode
cs_firewall: cs_firewall:
@ -337,8 +337,8 @@
- name: verify results of absent firewall rule ingress 5300 in check mode - name: verify results of absent firewall rule ingress 5300 in check mode
assert: assert:
that: that:
- fw|success - fw is successful
- fw|changed - fw is changed
- fw.cidr == "1.2.3.0/24,4.5.6.0/24" - fw.cidr == "1.2.3.0/24,4.5.6.0/24"
- fw.cidrs == [ '1.2.3.0/24', '4.5.6.0/24' ] - fw.cidrs == [ '1.2.3.0/24', '4.5.6.0/24' ]
- fw.ip_address == "{{ cs_firewall_ip_address }}" - fw.ip_address == "{{ cs_firewall_ip_address }}"
@ -362,8 +362,8 @@
- name: verify results of absent firewall rule ingress 5300 - name: verify results of absent firewall rule ingress 5300
assert: assert:
that: that:
- fw|success - fw is successful
- fw|changed - fw is changed
- fw.cidr == "1.2.3.0/24,4.5.6.0/24" - fw.cidr == "1.2.3.0/24,4.5.6.0/24"
- fw.cidrs == [ '1.2.3.0/24', '4.5.6.0/24' ] - fw.cidrs == [ '1.2.3.0/24', '4.5.6.0/24' ]
- fw.ip_address == "{{ cs_firewall_ip_address }}" - fw.ip_address == "{{ cs_firewall_ip_address }}"
@ -387,8 +387,8 @@
- name: verify results of absent firewall rule ingress 5300 idempotence - name: verify results of absent firewall rule ingress 5300 idempotence
assert: assert:
that: that:
- fw|success - fw is successful
- not fw|changed - fw is not changed
- name: test absent firewall rule egress all in check mode - name: test absent firewall rule egress all in check mode
cs_firewall: cs_firewall:
@ -402,8 +402,8 @@
- name: verify results of absent firewall rule egress all in check mode - name: verify results of absent firewall rule egress all in check mode
assert: assert:
that: that:
- fw|success - fw is successful
- fw|changed - fw is changed
- fw.cidr == "0.0.0.0/0" - fw.cidr == "0.0.0.0/0"
- fw.cidrs == [ '0.0.0.0/0' ] - fw.cidrs == [ '0.0.0.0/0' ]
- fw.network == "{{ cs_firewall_network }}" - fw.network == "{{ cs_firewall_network }}"
@ -421,8 +421,8 @@
- name: verify results of absent firewall rule egress all - name: verify results of absent firewall rule egress all
assert: assert:
that: that:
- fw|success - fw is successful
- fw|changed - fw is changed
- fw.cidr == "0.0.0.0/0" - fw.cidr == "0.0.0.0/0"
- fw.cidrs == [ '0.0.0.0/0' ] - fw.cidrs == [ '0.0.0.0/0' ]
- fw.network == "{{ cs_firewall_network }}" - fw.network == "{{ cs_firewall_network }}"
@ -440,8 +440,8 @@
- name: verify results of absent firewall rule egress all idempotence - name: verify results of absent firewall rule egress all idempotence
assert: assert:
that: that:
- fw|success - fw is successful
- not fw|changed - fw is not changed
- name: network cleanup - name: network cleanup
cs_network: cs_network:
@ -452,4 +452,4 @@
- name: verify network cleanup - name: verify network cleanup
assert: assert:
that: that:
- net|success - net is successful

@ -6,7 +6,7 @@
- name: verify test fail missing url if host is not existent - name: verify test fail missing url if host is not existent
assert: assert:
that: that:
- host|failed - host is failed
- 'host.msg == "missing required arguments: name"' - 'host.msg == "missing required arguments: name"'
- name: test fail missing params if host is not existent - name: test fail missing params if host is not existent
@ -17,7 +17,7 @@
- name: verify test fail missing params if host is not existent - name: verify test fail missing params if host is not existent
assert: assert:
that: that:
- host|failed - host is failed
- 'host.msg == "missing required arguments: password, username, hypervisor, pod"' - 'host.msg == "missing required arguments: password, username, hypervisor, pod"'
- name: test create a host in check mode - name: test create a host in check mode
@ -38,7 +38,7 @@
- name: verify test create a host in check mode - name: verify test create a host in check mode
assert: assert:
that: that:
- host|changed - host is changed
- name: test create a host - name: test create a host
cs_host: cs_host:
@ -57,7 +57,7 @@
- name: verify test create a host - name: verify test create a host
assert: assert:
that: that:
- host|changed - host is changed
- host.cluster == 'C0-basic' - host.cluster == 'C0-basic'
- host.pod == 'POD0-basic' - host.pod == 'POD0-basic'
- host.hypervisor == 'Simulator' - host.hypervisor == 'Simulator'
@ -91,7 +91,7 @@
- name: verify test create a host idempotence - name: verify test create a host idempotence
assert: assert:
that: that:
- not host|changed - host is not changed
- host.cluster == 'C0-basic' - host.cluster == 'C0-basic'
- host.pod == 'POD0-basic' - host.pod == 'POD0-basic'
- host.hypervisor == 'Simulator' - host.hypervisor == 'Simulator'
@ -120,7 +120,7 @@
- name: verify test update a host in check mode - name: verify test update a host in check mode
assert: assert:
that: that:
- host|changed - host is changed
- host.cluster == 'C0-basic' - host.cluster == 'C0-basic'
- host.pod == 'POD0-basic' - host.pod == 'POD0-basic'
- host.hypervisor == 'Simulator' - host.hypervisor == 'Simulator'
@ -148,7 +148,7 @@
- name: verify test update a host in check mode - name: verify test update a host in check mode
assert: assert:
that: that:
- host|changed - host is changed
- host.cluster == 'C0-basic' - host.cluster == 'C0-basic'
- host.pod == 'POD0-basic' - host.pod == 'POD0-basic'
- host.hypervisor == 'Simulator' - host.hypervisor == 'Simulator'
@ -176,7 +176,7 @@
- name: verify test update a host idempotence - name: verify test update a host idempotence
assert: assert:
that: that:
- not host|changed - host is not changed
- host.cluster == 'C0-basic' - host.cluster == 'C0-basic'
- host.pod == 'POD0-basic' - host.pod == 'POD0-basic'
- host.hypervisor == 'Simulator' - host.hypervisor == 'Simulator'
@ -203,7 +203,7 @@
- name: verify test update host remove host_tags - name: verify test update host remove host_tags
assert: assert:
that: that:
- host|changed - host is changed
- host.host_tags|length == 0 - host.host_tags|length == 0
- host.cluster == 'C0-basic' - host.cluster == 'C0-basic'
- host.pod == 'POD0-basic' - host.pod == 'POD0-basic'
@ -231,7 +231,7 @@
- name: verify test update host remove host_tags idempotence - name: verify test update host remove host_tags idempotence
assert: assert:
that: that:
- not host|changed - host is not changed
- len(host.host_tags) == 0 - len(host.host_tags) == 0
- host.cluster == 'C0-basic' - host.cluster == 'C0-basic'
- host.pod == 'POD0-basic' - host.pod == 'POD0-basic'
@ -254,7 +254,7 @@
- name: verify test put host in maintenance in check mode - name: verify test put host in maintenance in check mode
assert: assert:
that: that:
- host|changed - host is changed
- host.cluster == 'C0-basic' - host.cluster == 'C0-basic'
- host.pod == 'POD0-basic' - host.pod == 'POD0-basic'
- host.hypervisor == 'Simulator' - host.hypervisor == 'Simulator'
@ -274,7 +274,7 @@
- name: verify test put host in maintenance - name: verify test put host in maintenance
assert: assert:
that: that:
- host|changed - host is changed
- host.cluster == 'C0-basic' - host.cluster == 'C0-basic'
- host.pod == 'POD0-basic' - host.pod == 'POD0-basic'
- host.hypervisor == 'Simulator' - host.hypervisor == 'Simulator'
@ -294,7 +294,7 @@
- name: verify test put host in maintenance idempotence - name: verify test put host in maintenance idempotence
assert: assert:
that: that:
- not host|changed - host is not changed
- host.cluster == 'C0-basic' - host.cluster == 'C0-basic'
- host.pod == 'POD0-basic' - host.pod == 'POD0-basic'
- host.hypervisor == 'Simulator' - host.hypervisor == 'Simulator'
@ -315,7 +315,7 @@
- name: verify test put host out of maintenance in check mode - name: verify test put host out of maintenance in check mode
assert: assert:
that: that:
- host|changed - host is changed
- host.cluster == 'C0-basic' - host.cluster == 'C0-basic'
- host.pod == 'POD0-basic' - host.pod == 'POD0-basic'
- host.hypervisor == 'Simulator' - host.hypervisor == 'Simulator'
@ -335,7 +335,7 @@
- name: verify test put host out of maintenance - name: verify test put host out of maintenance
assert: assert:
that: that:
- host|changed - host is changed
- host.cluster == 'C0-basic' - host.cluster == 'C0-basic'
- host.pod == 'POD0-basic' - host.pod == 'POD0-basic'
- host.hypervisor == 'Simulator' - host.hypervisor == 'Simulator'
@ -355,7 +355,7 @@
- name: verify test put host out of maintenance idempotence - name: verify test put host out of maintenance idempotence
assert: assert:
that: that:
- not host|changed - host is not changed
- host.cluster == 'C0-basic' - host.cluster == 'C0-basic'
- host.pod == 'POD0-basic' - host.pod == 'POD0-basic'
- host.hypervisor == 'Simulator' - host.hypervisor == 'Simulator'
@ -376,7 +376,7 @@
- name: verify test remove a host in check mode - name: verify test remove a host in check mode
assert: assert:
that: that:
- host|changed - host is changed
- host.cluster == 'C0-basic' - host.cluster == 'C0-basic'
- host.pod == 'POD0-basic' - host.pod == 'POD0-basic'
- host.hypervisor == 'Simulator' - host.hypervisor == 'Simulator'
@ -396,7 +396,7 @@
- name: verify test remove a host - name: verify test remove a host
assert: assert:
that: that:
- host|changed - host is changed
- host.cluster == 'C0-basic' - host.cluster == 'C0-basic'
- host.pod == 'POD0-basic' - host.pod == 'POD0-basic'
- host.hypervisor == 'Simulator' - host.hypervisor == 'Simulator'
@ -416,4 +416,4 @@
- name: verify test remove a host idempotenc - name: verify test remove a host idempotenc
assert: assert:
that: that:
- not host|changed - host is not changed

@ -8,8 +8,8 @@
- name: verify destroy instance in check mode - name: verify destroy instance in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.state != "Destroyed" - instance.state != "Destroyed"
- name: test destroy instance - name: test destroy instance
@ -20,8 +20,8 @@
- name: verify destroy instance - name: verify destroy instance
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.state == "Destroyed" - instance.state == "Destroyed"
- name: test destroy instance idempotence - name: test destroy instance idempotence
@ -32,8 +32,8 @@
- name: verify destroy instance idempotence - name: verify destroy instance idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- name: test recover to stopped state and update a deleted instance in check mode - name: test recover to stopped state and update a deleted instance in check mode
cs_instance: cs_instance:
@ -45,8 +45,8 @@
- name: verify test recover to stopped state and update a deleted instance in check mode - name: verify test recover to stopped state and update a deleted instance in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- name: test recover to stopped state and update a deleted instance - name: test recover to stopped state and update a deleted instance
cs_instance: cs_instance:
@ -57,8 +57,8 @@
- name: verify test recover to stopped state and update a deleted instance - name: verify test recover to stopped state and update a deleted instance
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.state == "Stopped" - instance.state == "Stopped"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
@ -71,8 +71,8 @@
- name: verify test recover to stopped state and update a deleted instance idempotence - name: verify test recover to stopped state and update a deleted instance idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.state == "Stopped" - instance.state == "Stopped"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
@ -85,8 +85,8 @@
- name: verify test expunge instance in check mode - name: verify test expunge instance in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.state == "Stopped" - instance.state == "Stopped"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
@ -98,8 +98,8 @@
- name: verify test expunge instance - name: verify test expunge instance
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.state == "Stopped" - instance.state == "Stopped"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
@ -111,5 +111,5 @@
- name: verify test expunge instance idempotence - name: verify test expunge instance idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed

@ -7,8 +7,8 @@
- name: verify destroy instance with display_name - name: verify destroy instance with display_name
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.state == "Destroyed" - instance.state == "Destroyed"
- name: test destroy instance with display_name idempotence - name: test destroy instance with display_name idempotence
@ -19,8 +19,8 @@
- name: verify destroy instance with display_name idempotence - name: verify destroy instance with display_name idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- name: test recover to stopped state and update a deleted instance with display_name - name: test recover to stopped state and update a deleted instance with display_name
cs_instance: cs_instance:
@ -31,8 +31,8 @@
- name: verify test recover to stopped state and update a deleted instance with display_name - name: verify test recover to stopped state and update a deleted instance with display_name
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.state == "Stopped" - instance.state == "Stopped"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"

@ -5,26 +5,26 @@
- name: verify cleanup ssh key - name: verify cleanup ssh key
assert: assert:
that: that:
- sshkey|success - sshkey is successful
- name: cleanup affinity group - name: cleanup affinity group
cs_affinitygroup: name={{ cs_resource_prefix }}-ag state=absent cs_affinitygroup: name={{ cs_resource_prefix }}-ag state=absent
register: ag register: ag
until: ag|success until: ag is successful
retries: 20 retries: 20
delay: 5 delay: 5
- name: verify cleanup affinity group - name: verify cleanup affinity group
assert: assert:
that: that:
- ag|success - ag is successful
- name: cleanup security group ...take a while unless instance is expunged - name: cleanup security group ...take a while unless instance is expunged
cs_securitygroup: name={{ cs_resource_prefix }}-sg state=absent cs_securitygroup: name={{ cs_resource_prefix }}-sg state=absent
register: sg register: sg
until: sg|success until: sg is successful
retries: 100 retries: 100
delay: 10 delay: 10
- name: verify cleanup security group - name: verify cleanup security group
assert: assert:
that: that:
- sg|success - sg is successful

@ -5,7 +5,7 @@
- name: verify instance to be absent - name: verify instance to be absent
assert: assert:
that: that:
- instance|success - instance is successful
- name: test create instance in check mode - name: test create instance in check mode
cs_instance: cs_instance:
@ -21,8 +21,8 @@
- name: verify create instance in check mode - name: verify create instance in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- name: test create instance - name: test create instance
cs_instance: cs_instance:
@ -37,8 +37,8 @@
- name: verify create instance - name: verify create instance
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
@ -59,8 +59,8 @@
- name: verify create instance idempotence - name: verify create instance idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
@ -77,8 +77,8 @@
- name: verify running instance not updated in check mode - name: verify running instance not updated in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
@ -93,8 +93,8 @@
- name: verify running instance not updated - name: verify running instance not updated
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
@ -109,8 +109,8 @@
- name: verify stopping instance in check mode - name: verify stopping instance in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
@ -124,8 +124,8 @@
- name: verify stopping instance - name: verify stopping instance
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
@ -139,8 +139,8 @@
- name: verify stopping instance idempotence - name: verify stopping instance idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.state == "Stopped" - instance.state == "Stopped"
- name: test updating stopped instance in check mode - name: test updating stopped instance in check mode
@ -153,8 +153,8 @@
- name: verify updating stopped instance in check mode - name: verify updating stopped instance in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
@ -169,8 +169,8 @@
- name: verify updating stopped instance - name: verify updating stopped instance
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_2 }}" - instance.service_offering == "{{ test_cs_instance_offering_2 }}"
@ -185,8 +185,8 @@
- name: verify updating stopped instance idempotence - name: verify updating stopped instance idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_2 }}" - instance.service_offering == "{{ test_cs_instance_offering_2 }}"
@ -201,8 +201,8 @@
- name: verify starting instance in check mode - name: verify starting instance in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_2 }}" - instance.service_offering == "{{ test_cs_instance_offering_2 }}"
@ -216,8 +216,8 @@
- name: verify starting instance - name: verify starting instance
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_2 }}" - instance.service_offering == "{{ test_cs_instance_offering_2 }}"
@ -231,8 +231,8 @@
- name: verify starting instance idempotence - name: verify starting instance idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_2 }}" - instance.service_offering == "{{ test_cs_instance_offering_2 }}"
@ -248,8 +248,8 @@
- name: verify force update running instance in check mode - name: verify force update running instance in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_2 }}" - instance.service_offering == "{{ test_cs_instance_offering_2 }}"
@ -264,8 +264,8 @@
- name: verify force update running instance - name: verify force update running instance
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
@ -280,8 +280,8 @@
- name: verify force update running instance idempotence - name: verify force update running instance idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
@ -297,8 +297,8 @@
- name: verify restore instance in check mode - name: verify restore instance in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
@ -312,8 +312,8 @@
- name: verify restore instance - name: verify restore instance
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"

@ -5,7 +5,7 @@
- name: verify instance with display_name to be absent - name: verify instance with display_name to be absent
assert: assert:
that: that:
- instance|success - instance is successful
- name: test create instance with display_name - name: test create instance with display_name
cs_instance: cs_instance:
@ -20,8 +20,8 @@
- name: verify create instance with display_name - name: verify create instance with display_name
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
- instance.state == "Running" - instance.state == "Running"
@ -41,8 +41,8 @@
- name: verify create instance with display_name idempotence - name: verify create instance with display_name idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
- instance.state == "Running" - instance.state == "Running"
@ -57,8 +57,8 @@
- name: verify running instance with display_name not updated - name: verify running instance with display_name not updated
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
- instance.state == "Running" - instance.state == "Running"
@ -71,8 +71,8 @@
- name: verify stopping instance with display_name - name: verify stopping instance with display_name
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
- instance.state == "Stopped" - instance.state == "Stopped"
@ -85,8 +85,8 @@
- name: verify stopping instance idempotence - name: verify stopping instance idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.state == "Stopped" - instance.state == "Stopped"
- name: test updating stopped instance with display_name - name: test updating stopped instance with display_name
@ -97,8 +97,8 @@
- name: verify updating stopped instance with display_name - name: verify updating stopped instance with display_name
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_2 }}" - instance.service_offering == "{{ test_cs_instance_offering_2 }}"
- instance.state == "Stopped" - instance.state == "Stopped"
@ -111,8 +111,8 @@
- name: verify starting instance with display_name - name: verify starting instance with display_name
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_2 }}" - instance.service_offering == "{{ test_cs_instance_offering_2 }}"
- instance.state == "Running" - instance.state == "Running"
@ -125,8 +125,8 @@
- name: verify starting instance with display_name idempotence - name: verify starting instance with display_name idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_2 }}" - instance.service_offering == "{{ test_cs_instance_offering_2 }}"
- instance.state == "Running" - instance.state == "Running"
@ -140,8 +140,8 @@
- name: verify force update running instance with display_name - name: verify force update running instance with display_name
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
- instance.state == "Running" - instance.state == "Running"
@ -155,8 +155,8 @@
- name: verify force update running instance with display_name idempotence - name: verify force update running instance with display_name idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
- instance.state == "Running" - instance.state == "Running"
@ -170,7 +170,7 @@
- name: verify restore instance with display_name - name: verify restore instance with display_name
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"

@ -6,7 +6,7 @@
- name: verify test create project - name: verify test create project
assert: assert:
that: that:
- prj|success - prj is successful
- name: setup instance in project to be absent - name: setup instance in project to be absent
cs_instance: cs_instance:
@ -17,7 +17,7 @@
- name: verify instance in project to be absent - name: verify instance in project to be absent
assert: assert:
that: that:
- instance|success - instance is successful
- name: setup ssh key in project - name: setup ssh key in project
cs_sshkeypair: cs_sshkeypair:
@ -27,7 +27,7 @@
- name: verify setup ssh key in project - name: verify setup ssh key in project
assert: assert:
that: that:
- sshkey|success - sshkey is successful
- name: setup affinity group in project - name: setup affinity group in project
cs_affinitygroup: cs_affinitygroup:
@ -37,7 +37,7 @@
- name: verify setup affinity group in project - name: verify setup affinity group in project
assert: assert:
that: that:
- ag|success - ag is successful
- name: setup security group in project - name: setup security group in project
cs_securitygroup: cs_securitygroup:
@ -47,7 +47,7 @@
- name: verify setup security group in project - name: verify setup security group in project
assert: assert:
that: that:
- sg|success - sg is successful
- name: test create instance in project in check mode - name: test create instance in project in check mode
cs_instance: cs_instance:
@ -64,8 +64,8 @@
- name: verify create instance in project in check mode - name: verify create instance in project in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- name: test create instance in project - name: test create instance in project
cs_instance: cs_instance:
@ -81,8 +81,8 @@
- name: verify create instance in project - name: verify create instance in project
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.project == "{{ cs_resource_prefix }}-prj" - instance.project == "{{ cs_resource_prefix }}-prj"
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
@ -105,8 +105,8 @@
- name: verify create instance in project idempotence - name: verify create instance in project idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.project == "{{ cs_resource_prefix }}-prj" - instance.project == "{{ cs_resource_prefix }}-prj"
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
@ -125,8 +125,8 @@
- name: verify running instance in project not updated in check mode - name: verify running instance in project not updated in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.project == "{{ cs_resource_prefix }}-prj" - instance.project == "{{ cs_resource_prefix }}-prj"
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
@ -143,8 +143,8 @@
- name: verify running instance in project not updated - name: verify running instance in project not updated
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.project == "{{ cs_resource_prefix }}-prj" - instance.project == "{{ cs_resource_prefix }}-prj"
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
@ -161,8 +161,8 @@
- name: verify stopping instance in project in check mode - name: verify stopping instance in project in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.project == "{{ cs_resource_prefix }}-prj" - instance.project == "{{ cs_resource_prefix }}-prj"
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
@ -178,8 +178,8 @@
- name: verify stopping instance - name: verify stopping instance
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.project == "{{ cs_resource_prefix }}-prj" - instance.project == "{{ cs_resource_prefix }}-prj"
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
@ -195,8 +195,8 @@
- name: verify stopping instance in project idempotence - name: verify stopping instance in project idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.state == "Stopped" - instance.state == "Stopped"
- name: test updating stopped instance in project in check mode - name: test updating stopped instance in project in check mode
@ -210,8 +210,8 @@
- name: verify updating stopped instance in project in check mode - name: verify updating stopped instance in project in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.project == "{{ cs_resource_prefix }}-prj" - instance.project == "{{ cs_resource_prefix }}-prj"
- instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
@ -228,8 +228,8 @@
- name: verify updating stopped instance - name: verify updating stopped instance
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.project == "{{ cs_resource_prefix }}-prj" - instance.project == "{{ cs_resource_prefix }}-prj"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
@ -246,8 +246,8 @@
- name: verify updating stopped instance in project idempotence - name: verify updating stopped instance in project idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.project == "{{ cs_resource_prefix }}-prj" - instance.project == "{{ cs_resource_prefix }}-prj"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
@ -264,8 +264,8 @@
- name: verify starting instance in project in check mode - name: verify starting instance in project in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.project == "{{ cs_resource_prefix }}-prj" - instance.project == "{{ cs_resource_prefix }}-prj"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
@ -281,8 +281,8 @@
- name: verify starting instance - name: verify starting instance
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.project == "{{ cs_resource_prefix }}-prj" - instance.project == "{{ cs_resource_prefix }}-prj"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
@ -298,8 +298,8 @@
- name: verify starting instance in project idempotence - name: verify starting instance in project idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.project == "{{ cs_resource_prefix }}-prj" - instance.project == "{{ cs_resource_prefix }}-prj"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
@ -317,8 +317,8 @@
- name: verify force update running instance in project in check mode - name: verify force update running instance in project in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.project == "{{ cs_resource_prefix }}-prj" - instance.project == "{{ cs_resource_prefix }}-prj"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
@ -335,8 +335,8 @@
- name: verify force update running instance - name: verify force update running instance
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.project == "{{ cs_resource_prefix }}-prj" - instance.project == "{{ cs_resource_prefix }}-prj"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
@ -353,8 +353,8 @@
- name: verify force update running instance in project idempotence - name: verify force update running instance in project idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.project == "{{ cs_resource_prefix }}-prj" - instance.project == "{{ cs_resource_prefix }}-prj"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
@ -372,8 +372,8 @@
- name: verify restore instance in project in check mode - name: verify restore instance in project in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.project == "{{ cs_resource_prefix }}-prj" - instance.project == "{{ cs_resource_prefix }}-prj"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
@ -389,8 +389,8 @@
- name: verify restore instance in project - name: verify restore instance in project
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
- instance.project == "{{ cs_resource_prefix }}-prj" - instance.project == "{{ cs_resource_prefix }}-prj"
- instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}"
@ -406,8 +406,8 @@
- name: verify destroy instance in project in check mode - name: verify destroy instance in project in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.state != "Destroyed" - instance.state != "Destroyed"
- name: test destroy instance in project - name: test destroy instance in project
@ -419,8 +419,8 @@
- name: verify destroy instance in project - name: verify destroy instance in project
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.state == "Destroyed" - instance.state == "Destroyed"
- name: test destroy instance in project idempotence - name: test destroy instance in project idempotence
@ -432,8 +432,8 @@
- name: verify destroy instance in project idempotence - name: verify destroy instance in project idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- name: test recover in project to stopped state and update a deleted instance in project in check mode - name: test recover in project to stopped state and update a deleted instance in project in check mode
cs_instance: cs_instance:
@ -446,8 +446,8 @@
- name: verify test recover to stopped state and update a deleted instance in project in check mode - name: verify test recover to stopped state and update a deleted instance in project in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- name: test recover to stopped state and update a deleted instance in project - name: test recover to stopped state and update a deleted instance in project
cs_instance: cs_instance:
@ -459,8 +459,8 @@
- name: verify test recover to stopped state and update a deleted instance in project - name: verify test recover to stopped state and update a deleted instance in project
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.state == "Stopped" - instance.state == "Stopped"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
@ -474,8 +474,8 @@
- name: verify test recover to stopped state and update a deleted instance in project idempotence - name: verify test recover to stopped state and update a deleted instance in project idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.state == "Stopped" - instance.state == "Stopped"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
@ -489,8 +489,8 @@
- name: verify test expunge instance in check mode - name: verify test expunge instance in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.state == "Stopped" - instance.state == "Stopped"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
@ -503,8 +503,8 @@
- name: verify test expunge instance in project - name: verify test expunge instance in project
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.state == "Stopped" - instance.state == "Stopped"
- instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.service_offering == "{{ test_cs_instance_offering_1 }}"
@ -517,8 +517,8 @@
- name: verify test expunge instance in project idempotence - name: verify test expunge instance in project idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- name: cleanup ssh key in project - name: cleanup ssh key in project
cs_sshkeypair: cs_sshkeypair:
@ -529,7 +529,7 @@
- name: verify cleanup ssh key in project - name: verify cleanup ssh key in project
assert: assert:
that: that:
- sshkey|success - sshkey is successful
- name: cleanup affinity group in project - name: cleanup affinity group in project
cs_affinitygroup: cs_affinitygroup:
@ -537,13 +537,13 @@
project: "{{ cs_resource_prefix }}-prj" project: "{{ cs_resource_prefix }}-prj"
state: absent state: absent
register: ag register: ag
until: ag|success until: ag is successful
retries: 20 retries: 20
delay: 5 delay: 5
- name: verify cleanup affinity group in project - name: verify cleanup affinity group in project
assert: assert:
that: that:
- ag|success - ag is successful
- name: cleanup security group in project ...take a while unless instance in project is expunged - name: cleanup security group in project ...take a while unless instance in project is expunged
cs_securitygroup: cs_securitygroup:
@ -551,10 +551,10 @@
project: "{{ cs_resource_prefix }}-prj" project: "{{ cs_resource_prefix }}-prj"
state: absent state: absent
register: sg register: sg
until: sg|success until: sg is successful
retries: 100 retries: 100
delay: 10 delay: 10
- name: verify cleanup security group in project - name: verify cleanup security group in project
assert: assert:
that: that:
- sg|success - sg is successful

@ -5,7 +5,7 @@
- name: verify setup ssh key - name: verify setup ssh key
assert: assert:
that: that:
- sshkey|success - sshkey is successful
- name: setup affinity group - name: setup affinity group
cs_affinitygroup: name={{ cs_resource_prefix }}-ag cs_affinitygroup: name={{ cs_resource_prefix }}-ag
@ -13,7 +13,7 @@
- name: verify setup affinity group - name: verify setup affinity group
assert: assert:
that: that:
- ag|success - ag is successful
- name: setup security group - name: setup security group
cs_securitygroup: name={{ cs_resource_prefix }}-sg cs_securitygroup: name={{ cs_resource_prefix }}-sg
@ -21,4 +21,4 @@
- name: verify setup security group - name: verify setup security group
assert: assert:
that: that:
- sg|success - sg is successful

@ -10,7 +10,7 @@
- name: verify update instance ssh key non existent - name: verify update instance ssh key non existent
assert: assert:
that: that:
- instance|failed - instance is failed
- 'instance.msg == "SSH key not found: {{ cs_resource_prefix }}-sshkey2"' - 'instance.msg == "SSH key not found: {{ cs_resource_prefix }}-sshkey2"'
- name: test create instance without keypair in check mode - name: test create instance without keypair in check mode
@ -23,8 +23,8 @@
- name: verify create instance without keypair in check mode - name: verify create instance without keypair in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- name: test create instance without keypair - name: test create instance without keypair
cs_instance: cs_instance:
@ -35,8 +35,8 @@
- name: verify create instance without keypair - name: verify create instance without keypair
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.ssh_key is not defined - instance.ssh_key is not defined
- name: test create instance without keypair idempotence - name: test create instance without keypair idempotence
@ -48,8 +48,8 @@
- name: verify create instance without keypair idempotence - name: verify create instance without keypair idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.ssh_key is not defined - instance.ssh_key is not defined
- name: setup ssh key2 - name: setup ssh key2
@ -58,7 +58,7 @@
- name: verify setup ssh key2 - name: verify setup ssh key2
assert: assert:
that: that:
- sshkey|success - sshkey is successful
- name: test update instance ssh key2 in check mode - name: test update instance ssh key2 in check mode
cs_instance: cs_instance:
@ -70,7 +70,7 @@
- name: verify update instance ssh key2 in check mode - name: verify update instance ssh key2 in check mode
assert: assert:
that: that:
- instance|changed - instance is changed
- instance.ssh_key is not defined - instance.ssh_key is not defined
- name: test update instance ssh key2 - name: test update instance ssh key2
@ -82,7 +82,7 @@
- name: verify update instance ssh key2 - name: verify update instance ssh key2
assert: assert:
that: that:
- instance|changed - instance is changed
- instance.ssh_key == "{{ cs_resource_prefix }}-sshkey2" - instance.ssh_key == "{{ cs_resource_prefix }}-sshkey2"
- name: test update instance ssh key2 idempotence - name: test update instance ssh key2 idempotence
@ -94,7 +94,7 @@
- name: verify update instance ssh key2 idempotence - name: verify update instance ssh key2 idempotence
assert: assert:
that: that:
- not instance|changed - instance is not changed
- instance.ssh_key == "{{ cs_resource_prefix }}-sshkey2" - instance.ssh_key == "{{ cs_resource_prefix }}-sshkey2"
- name: cleanup ssh key2 - name: cleanup ssh key2
@ -105,7 +105,7 @@
- name: verify cleanup ssh key2 - name: verify cleanup ssh key2
assert: assert:
that: that:
- sshkey2|success - sshkey2 is successful
- name: test update instance ssh key2 idempotence2 - name: test update instance ssh key2 idempotence2
cs_instance: cs_instance:
@ -117,7 +117,7 @@
- name: verify update instance ssh key2 idempotence2 - name: verify update instance ssh key2 idempotence2
assert: assert:
that: that:
- instance|failed - instance is failed
- 'instance.msg == "SSH key not found: {{ cs_resource_prefix }}-sshkey2"' - 'instance.msg == "SSH key not found: {{ cs_resource_prefix }}-sshkey2"'
- name: test update instance ssh key in check mode - name: test update instance ssh key in check mode
@ -130,7 +130,7 @@
- name: verify update instance ssh key in check mode - name: verify update instance ssh key in check mode
assert: assert:
that: that:
- instance|changed - instance is changed
- instance.ssh_key is not defined - instance.ssh_key is not defined
- name: test update instance ssh key - name: test update instance ssh key
@ -142,7 +142,7 @@
- name: verify update instance ssh key - name: verify update instance ssh key
assert: assert:
that: that:
- instance|changed - instance is changed
- instance.ssh_key == "{{ cs_resource_prefix }}-sshkey" - instance.ssh_key == "{{ cs_resource_prefix }}-sshkey"
- name: test update instance ssh key idempotence - name: test update instance ssh key idempotence
@ -154,7 +154,7 @@
- name: verify update instance ssh key idempotence - name: verify update instance ssh key idempotence
assert: assert:
that: that:
- not instance|changed - instance is not changed
- instance.ssh_key == "{{ cs_resource_prefix }}-sshkey" - instance.ssh_key == "{{ cs_resource_prefix }}-sshkey"
- name: cleanup expunge instance - name: cleanup expunge instance
@ -165,4 +165,4 @@
- name: verify cleanup expunge instance - name: verify cleanup expunge instance
assert: assert:
that: that:
- instance|success - instance is successful

@ -12,8 +12,8 @@
- name: verify add tags to instance in check mode - name: verify add tags to instance in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- not instance.tags - not instance.tags
- name: test add tags to instance - name: test add tags to instance
@ -28,8 +28,8 @@
- name: verify add tags to instance - name: verify add tags to instance
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.tags|length == 2 - instance.tags|length == 2
- "instance.tags[0]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag1' ]" - "instance.tags[0]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag1' ]"
- "instance.tags[1]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag1' ]" - "instance.tags[1]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag1' ]"
@ -46,8 +46,8 @@
- name: verify tags to instance idempotence - name: verify tags to instance idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.tags|length == 2 - instance.tags|length == 2
- "instance.tags[0]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag1' ]" - "instance.tags[0]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag1' ]"
- "instance.tags[1]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag1' ]" - "instance.tags[1]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag1' ]"
@ -65,8 +65,8 @@
- name: verify tags to instance idempotence in check mode - name: verify tags to instance idempotence in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.tags|length == 2 - instance.tags|length == 2
- "instance.tags[0]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag1' ]" - "instance.tags[0]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag1' ]"
- "instance.tags[1]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag1' ]" - "instance.tags[1]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag1' ]"
@ -83,8 +83,8 @@
- name: verify tags to instance idempotence - name: verify tags to instance idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.tags|length == 2 - instance.tags|length == 2
- "instance.tags[0]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag3' ]" - "instance.tags[0]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag3' ]"
- "instance.tags[1]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag3' ]" - "instance.tags[1]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag3' ]"
@ -98,8 +98,8 @@
- name: verify not touch tags of instance if no param tags - name: verify not touch tags of instance if no param tags
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.tags|length == 2 - instance.tags|length == 2
- "instance.tags[0]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag3' ]" - "instance.tags[0]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag3' ]"
- "instance.tags[1]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag3' ]" - "instance.tags[1]['key'] in [ '{{ cs_resource_prefix }}-tag2', '{{ cs_resource_prefix }}-tag3' ]"
@ -115,8 +115,8 @@
- name: verify remove tags in check mode - name: verify remove tags in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.tags|length != 0 - instance.tags|length != 0
- name: test remove tags - name: test remove tags
@ -127,6 +127,6 @@
- name: verify remove tags - name: verify remove tags
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.tags|length == 0 - instance.tags|length == 0

@ -5,7 +5,7 @@
- name: verify setup ssh key - name: verify setup ssh key
assert: assert:
that: that:
- sshkey|success - sshkey is successful
- name: setup affinity group - name: setup affinity group
cs_affinitygroup: name={{ cs_resource_prefix }}-ag cs_affinitygroup: name={{ cs_resource_prefix }}-ag
@ -13,7 +13,7 @@
- name: verify setup affinity group - name: verify setup affinity group
assert: assert:
that: that:
- ag|success - ag is successful
- name: setup security group - name: setup security group
cs_securitygroup: name={{ cs_resource_prefix }}-sg cs_securitygroup: name={{ cs_resource_prefix }}-sg
@ -21,7 +21,7 @@
- name: verify setup security group - name: verify setup security group
assert: assert:
that: that:
- sg|success - sg is successful
- name: setup instance - name: setup instance
cs_instance: cs_instance:
@ -36,7 +36,7 @@
- name: verify create instance - name: verify create instance
assert: assert:
that: that:
- instance|success - instance is successful
- name: test instance facts in check mode - name: test instance facts in check mode
cs_instance_facts: cs_instance_facts:
@ -46,8 +46,8 @@
- name: verify test instance facts in check mode - name: verify test instance facts in check mode
assert: assert:
that: that:
- instance_facts|success - instance_facts is successful
- not instance_facts|changed - instance_facts is not changed
- cloudstack_instance.id == instance.id - cloudstack_instance.id == instance.id
- cloudstack_instance.domain == instance.domain - cloudstack_instance.domain == instance.domain
- cloudstack_instance.account == instance.account - cloudstack_instance.account == instance.account
@ -62,8 +62,8 @@
- name: verify test instance facts - name: verify test instance facts
assert: assert:
that: that:
- instance_facts|success - instance_facts is successful
- not instance_facts|changed - instance_facts is not changed
- cloudstack_instance.id == instance.id - cloudstack_instance.id == instance.id
- cloudstack_instance.domain == instance.domain - cloudstack_instance.domain == instance.domain
- cloudstack_instance.account == instance.account - cloudstack_instance.account == instance.account

@ -14,7 +14,7 @@
- name: verify setup network - name: verify setup network
assert: assert:
that: that:
- net|success - net is successful
- net.name == "net_nic" - net.name == "net_nic"
- name: setup instance - name: setup instance
@ -29,7 +29,7 @@
- name: verify setup instance - name: verify setup instance
assert: assert:
that: that:
- instance|success - instance is successful
- instance.name == "instance-nic-vm" - instance.name == "instance-nic-vm"
- instance.state == "Stopped" - instance.state == "Stopped"
@ -48,7 +48,7 @@
- name: verify setup network 2 - name: verify setup network 2
assert: assert:
that: that:
- net|success - net is successful
- net.name == "net_nic2" - net.name == "net_nic2"
- name: setup absent nic - name: setup absent nic
@ -61,7 +61,7 @@
- name: verify setup absent nic - name: verify setup absent nic
assert: assert:
that: that:
- nic|success - nic is successful
- name: test fail missing params - name: test fail missing params
cs_instance_nic: cs_instance_nic:
@ -70,7 +70,7 @@
- name: verify test fail missing params - name: verify test fail missing params
assert: assert:
that: that:
- nic|failed - nic is failed
- "nic.msg.startswith('missing required arguments: ')" - "nic.msg.startswith('missing required arguments: ')"
- name: test create nic in check mode - name: test create nic in check mode
@ -83,8 +83,8 @@
- name: verify test create nic in check mode - name: verify test create nic in check mode
assert: assert:
that: that:
- nic|success - nic is successful
- nic|changed - nic is changed
- nic.network == "net_nic2" - nic.network == "net_nic2"
- nic.vm == "instance-nic-vm" - nic.vm == "instance-nic-vm"
- nic.zone == "{{ cs_common_zone_adv }}" - nic.zone == "{{ cs_common_zone_adv }}"
@ -99,8 +99,8 @@
- name: verify test create nic - name: verify test create nic
assert: assert:
that: that:
- nic|success - nic is successful
- nic|changed - nic is changed
- nic.ip_address == "10.100.124.42" - nic.ip_address == "10.100.124.42"
- nic.netmask == "255.255.255.0" - nic.netmask == "255.255.255.0"
- nic.network == "net_nic2" - nic.network == "net_nic2"
@ -118,8 +118,8 @@
- name: verify test create nic idempotence - name: verify test create nic idempotence
assert: assert:
that: that:
- nic|success - nic is successful
- not nic|changed - nic is not changed
- nic.ip_address == "10.100.124.42" - nic.ip_address == "10.100.124.42"
- nic.netmask == "255.255.255.0" - nic.netmask == "255.255.255.0"
- nic.network == "net_nic2" - nic.network == "net_nic2"
@ -136,8 +136,8 @@
- name: verify test create nic without ip address idempotence - name: verify test create nic without ip address idempotence
assert: assert:
that: that:
- nic|success - nic is successful
- not nic|changed - nic is not changed
- nic.ip_address == "10.100.124.42" - nic.ip_address == "10.100.124.42"
- nic.netmask == "255.255.255.0" - nic.netmask == "255.255.255.0"
- nic.network == "net_nic2" - nic.network == "net_nic2"
@ -156,8 +156,8 @@
- name: verify test update nic in check mode - name: verify test update nic in check mode
assert: assert:
that: that:
- nic|success - nic is successful
- nic|changed - nic is changed
- nic.ip_address == "10.100.124.42" - nic.ip_address == "10.100.124.42"
- nic.netmask == "255.255.255.0" - nic.netmask == "255.255.255.0"
- nic.network == "net_nic2" - nic.network == "net_nic2"
@ -175,8 +175,8 @@
- name: verify test update nic - name: verify test update nic
assert: assert:
that: that:
- nic|success - nic is successful
- nic|changed - nic is changed
- nic.ip_address == "10.100.124.23" - nic.ip_address == "10.100.124.23"
- nic.netmask == "255.255.255.0" - nic.netmask == "255.255.255.0"
- nic.network == "net_nic2" - nic.network == "net_nic2"
@ -194,8 +194,8 @@
- name: verify test update nic idempotence - name: verify test update nic idempotence
assert: assert:
that: that:
- nic|success - nic is successful
- not nic|changed - nic is not changed
- nic.ip_address == "10.100.124.23" - nic.ip_address == "10.100.124.23"
- nic.netmask == "255.255.255.0" - nic.netmask == "255.255.255.0"
- nic.network == "net_nic2" - nic.network == "net_nic2"
@ -212,8 +212,8 @@
- name: verify test update nic without ip address idempotence - name: verify test update nic without ip address idempotence
assert: assert:
that: that:
- nic|success - nic is successful
- not nic|changed - nic is not changed
- nic.ip_address == "10.100.124.23" - nic.ip_address == "10.100.124.23"
- nic.netmask == "255.255.255.0" - nic.netmask == "255.255.255.0"
- nic.network == "net_nic2" - nic.network == "net_nic2"
@ -232,8 +232,8 @@
- name: verify test remove nic in check mode - name: verify test remove nic in check mode
assert: assert:
that: that:
- nic|success - nic is successful
- nic|changed - nic is changed
- nic.ip_address == "10.100.124.23" - nic.ip_address == "10.100.124.23"
- nic.netmask == "255.255.255.0" - nic.netmask == "255.255.255.0"
- nic.network == "net_nic2" - nic.network == "net_nic2"
@ -251,8 +251,8 @@
- name: verify test remove nic - name: verify test remove nic
assert: assert:
that: that:
- nic|success - nic is successful
- nic|changed - nic is changed
- nic.ip_address == "10.100.124.23" - nic.ip_address == "10.100.124.23"
- nic.netmask == "255.255.255.0" - nic.netmask == "255.255.255.0"
- nic.network == "net_nic2" - nic.network == "net_nic2"
@ -270,8 +270,8 @@
- name: verify test remove nic idempotence - name: verify test remove nic idempotence
assert: assert:
that: that:
- nic|success - nic is successful
- not nic|changed - nic is not changed
- name: cleanup instance - name: cleanup instance
cs_instance: cs_instance:
@ -281,7 +281,7 @@
- name: verify cleanup instance - name: verify cleanup instance
assert: assert:
that: that:
- instance|success - instance is successful
- name: cleanup network - name: cleanup network
cs_network: cs_network:
@ -292,7 +292,7 @@
- name: verify cleanup network - name: verify cleanup network
assert: assert:
that: that:
- net|success - net is successful
- name: cleanup network 2 - name: cleanup network 2
cs_network: cs_network:
@ -303,4 +303,4 @@
- name: verify cleanup network 2 - name: verify cleanup network 2
assert: assert:
that: that:
- net|success - net is successful

@ -14,7 +14,7 @@
- name: verify setup network - name: verify setup network
assert: assert:
that: that:
- net|success - net is successful
- net.name == "net_nic" - net.name == "net_nic"
- name: setup instance - name: setup instance
@ -29,7 +29,7 @@
- name: verify setup instance - name: verify setup instance
assert: assert:
that: that:
- instance|success - instance is successful
- instance.name == "instance-nic-vm" - instance.name == "instance-nic-vm"
- instance.state == "Stopped" - instance.state == "Stopped"
@ -48,7 +48,7 @@
- name: verify setup network 2 - name: verify setup network 2
assert: assert:
that: that:
- net|success - net is successful
- net.name == "net_nic2" - net.name == "net_nic2"
- name: setup nic - name: setup nic
@ -61,7 +61,7 @@
- name: verify test create nic - name: verify test create nic
assert: assert:
that: that:
- nic|success - nic is successful
- nic.ip_address == "10.100.124.42" - nic.ip_address == "10.100.124.42"
- nic.netmask == "255.255.255.0" - nic.netmask == "255.255.255.0"
- nic.network == "net_nic2" - nic.network == "net_nic2"
@ -80,7 +80,7 @@
- name: verify setup remove secondary ip - name: verify setup remove secondary ip
assert: assert:
that: that:
- sip|success - sip is successful
- name: test add secondary ip in check mode - name: test add secondary ip in check mode
cs_instance_nic_secondaryip: cs_instance_nic_secondaryip:
@ -93,8 +93,8 @@
- name: verify test add secondary ip in check mode - name: verify test add secondary ip in check mode
assert: assert:
that: that:
- sip|success - sip is successful
- sip|changed - sip is changed
- sip.network == "net_nic2" - sip.network == "net_nic2"
- sip.vm == "instance-nic-vm" - sip.vm == "instance-nic-vm"
- sip.zone == "{{ cs_common_zone_adv }}" - sip.zone == "{{ cs_common_zone_adv }}"
@ -109,8 +109,8 @@
- name: verify test add secondary ip - name: verify test add secondary ip
assert: assert:
that: that:
- sip|success - sip is successful
- sip|changed - sip is changed
- sip.vm_guest_ip == "10.100.124.43" - sip.vm_guest_ip == "10.100.124.43"
- sip.network == "net_nic2" - sip.network == "net_nic2"
- sip.vm == "instance-nic-vm" - sip.vm == "instance-nic-vm"
@ -126,8 +126,8 @@
- name: verify test add secondary ip idempotence - name: verify test add secondary ip idempotence
assert: assert:
that: that:
- sip|success - sip is successful
- not sip|changed - sip is not changed
- sip.vm_guest_ip == "10.100.124.43" - sip.vm_guest_ip == "10.100.124.43"
- sip.network == "net_nic2" - sip.network == "net_nic2"
- sip.vm == "instance-nic-vm" - sip.vm == "instance-nic-vm"
@ -145,8 +145,8 @@
- name: verify test remove secondary ip in check mode - name: verify test remove secondary ip in check mode
assert: assert:
that: that:
- sip|success - sip is successful
- sip|changed - sip is changed
- sip.vm_guest_ip == "10.100.124.43" - sip.vm_guest_ip == "10.100.124.43"
- sip.network == "net_nic2" - sip.network == "net_nic2"
- sip.vm == "instance-nic-vm" - sip.vm == "instance-nic-vm"
@ -163,8 +163,8 @@
- name: verify test remove secondary ip - name: verify test remove secondary ip
assert: assert:
that: that:
- sip|success - sip is successful
- sip|changed - sip is changed
- sip.vm_guest_ip == "10.100.124.43" - sip.vm_guest_ip == "10.100.124.43"
- sip.network == "net_nic2" - sip.network == "net_nic2"
- sip.vm == "instance-nic-vm" - sip.vm == "instance-nic-vm"
@ -181,8 +181,8 @@
- name: verify test remove secondary ip idempotence - name: verify test remove secondary ip idempotence
assert: assert:
that: that:
- sip|success - sip is successful
- not sip|changed - sip is not changed
- sip.network == "net_nic2" - sip.network == "net_nic2"
- sip.vm == "instance-nic-vm" - sip.vm == "instance-nic-vm"
- sip.zone == "{{ cs_common_zone_adv }}" - sip.zone == "{{ cs_common_zone_adv }}"
@ -195,7 +195,7 @@
- name: verify cleanup instance - name: verify cleanup instance
assert: assert:
that: that:
- instance|success - instance is successful
- name: cleanup network - name: cleanup network
cs_network: cs_network:
@ -206,7 +206,7 @@
- name: verify cleanup network - name: verify cleanup network
assert: assert:
that: that:
- net|success - net is successful
- name: cleanup network 2 - name: cleanup network 2
cs_network: cs_network:
@ -217,4 +217,4 @@
- name: verify cleanup network 2 - name: verify cleanup network 2
assert: assert:
that: that:
- net|success - net is successful

@ -5,7 +5,7 @@
- name: verify setup - name: verify setup
assert: assert:
that: that:
- ig|success - ig is successful
- name: test fail if missing name - name: test fail if missing name
action: cs_instancegroup action: cs_instancegroup
@ -14,7 +14,7 @@
- name: verify results of fail if missing name - name: verify results of fail if missing name
assert: assert:
that: that:
- ig|failed - ig is failed
- "ig.msg == 'missing required arguments: name'" - "ig.msg == 'missing required arguments: name'"
- name: test present instance group in check mode - name: test present instance group in check mode
@ -24,8 +24,8 @@
- name: verify results of create instance group in check mode - name: verify results of create instance group in check mode
assert: assert:
that: that:
- ig|success - ig is successful
- ig|changed - ig is changed
- name: test present instance group - name: test present instance group
cs_instancegroup: name={{ cs_resource_prefix }}_ig cs_instancegroup: name={{ cs_resource_prefix }}_ig
@ -33,8 +33,8 @@
- name: verify results of create instance group - name: verify results of create instance group
assert: assert:
that: that:
- ig|success - ig is successful
- ig|changed - ig is changed
- ig.name == "{{ cs_resource_prefix }}_ig" - ig.name == "{{ cs_resource_prefix }}_ig"
- name: test present instance group is idempotence - name: test present instance group is idempotence
@ -43,8 +43,8 @@
- name: verify results present instance group is idempotence - name: verify results present instance group is idempotence
assert: assert:
that: that:
- ig|success - ig is successful
- not ig|changed - ig is not changed
- ig.name == "{{ cs_resource_prefix }}_ig" - ig.name == "{{ cs_resource_prefix }}_ig"
- name: test absent instance group in check mode - name: test absent instance group in check mode
@ -54,8 +54,8 @@
- name: verify results of absent instance group in check mode - name: verify results of absent instance group in check mode
assert: assert:
that: that:
- ig|success - ig is successful
- ig|changed - ig is changed
- ig.name == "{{ cs_resource_prefix }}_ig" - ig.name == "{{ cs_resource_prefix }}_ig"
- name: test absent instance group - name: test absent instance group
@ -64,8 +64,8 @@
- name: verify results of absent instance group - name: verify results of absent instance group
assert: assert:
that: that:
- ig|success - ig is successful
- ig|changed - ig is changed
- ig.name == "{{ cs_resource_prefix }}_ig" - ig.name == "{{ cs_resource_prefix }}_ig"
- name: test absent instance group is idempotence - name: test absent instance group is idempotence
@ -74,6 +74,6 @@
- name: verify results of absent instance group is idempotence - name: verify results of absent instance group is idempotence
assert: assert:
that: that:
- ig|success - ig is successful
- not ig|changed - ig is not changed
- ig.name is undefined - ig.name is undefined

@ -7,7 +7,7 @@
- name: verify setup iso - name: verify setup iso
assert: assert:
that: that:
- iso|success - iso is successful
- name: test download iso in check mode - name: test download iso in check mode
cs_iso: cs_iso:
@ -20,7 +20,7 @@
- name: verify test download iso in check mode - name: verify test download iso in check mode
assert: assert:
that: that:
- iso|changed - iso is changed
- name: test download iso - name: test download iso
cs_iso: cs_iso:
@ -32,7 +32,7 @@
- name: verify test download iso - name: verify test download iso
assert: assert:
that: that:
- iso|changed - iso is changed
- iso.name == "{{ cs_resource_prefix }}-iso" - iso.name == "{{ cs_resource_prefix }}-iso"
- iso.display_text == "{{ cs_resource_prefix }}-iso" - iso.display_text == "{{ cs_resource_prefix }}-iso"
- iso.cross_zones == true - iso.cross_zones == true
@ -47,7 +47,7 @@
- name: verify test download iso idempotence - name: verify test download iso idempotence
assert: assert:
that: that:
- not iso|changed - iso is not changed
- iso.name == "{{ cs_resource_prefix }}-iso" - iso.name == "{{ cs_resource_prefix }}-iso"
- iso.display_text == "{{ cs_resource_prefix }}-iso" - iso.display_text == "{{ cs_resource_prefix }}-iso"
- iso.cross_zones == true - iso.cross_zones == true
@ -64,7 +64,7 @@
- name: verify test update iso in check mode - name: verify test update iso in check mode
assert: assert:
that: that:
- iso|changed - iso is changed
- iso.name == "{{ cs_resource_prefix }}-iso" - iso.name == "{{ cs_resource_prefix }}-iso"
- iso.display_text == "{{ cs_resource_prefix }}-iso" - iso.display_text == "{{ cs_resource_prefix }}-iso"
- iso.cross_zones == true - iso.cross_zones == true
@ -80,7 +80,7 @@
- name: verify test update iso - name: verify test update iso
assert: assert:
that: that:
- iso|changed - iso is changed
- iso.name == "{{ cs_resource_prefix }}-iso" - iso.name == "{{ cs_resource_prefix }}-iso"
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text" - iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
- iso.cross_zones == true - iso.cross_zones == true
@ -96,7 +96,7 @@
- name: verify test update iso idempotence - name: verify test update iso idempotence
assert: assert:
that: that:
- not iso|changed - iso is not changed
- iso.name == "{{ cs_resource_prefix }}-iso" - iso.name == "{{ cs_resource_prefix }}-iso"
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text" - iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
- iso.cross_zones == true - iso.cross_zones == true
@ -111,7 +111,7 @@
- name: verify test remove iso in check mode - name: verify test remove iso in check mode
assert: assert:
that: that:
- iso|changed - iso is changed
- iso.name == "{{ cs_resource_prefix }}-iso" - iso.name == "{{ cs_resource_prefix }}-iso"
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text" - iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
- iso.cross_zones == true - iso.cross_zones == true
@ -125,7 +125,7 @@
- name: verify test remove iso - name: verify test remove iso
assert: assert:
that: that:
- iso|changed - iso is changed
- iso.name == "{{ cs_resource_prefix }}-iso" - iso.name == "{{ cs_resource_prefix }}-iso"
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text" - iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
- iso.cross_zones == true - iso.cross_zones == true
@ -139,4 +139,4 @@
- name: verify test remove iso idempotence - name: verify test remove iso idempotence
assert: assert:
that: that:
- not iso|changed - iso is not changed

@ -8,8 +8,8 @@
- name: verify test create network for lb - name: verify test create network for lb
assert: assert:
that: that:
- lb_net|success - lb_net is successful
- lb_net|changed - lb_net is changed
- lb_net.name == "{{ cs_resource_prefix }}_net_lb" - lb_net.name == "{{ cs_resource_prefix }}_net_lb"
- name: setup instance in lb - name: setup instance in lb
@ -23,8 +23,8 @@
- name: verify setup instance in lb - name: verify setup instance in lb
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-lb" - instance.name == "{{ cs_resource_prefix }}-vm-lb"
- instance.state == "Running" - instance.state == "Running"
@ -36,7 +36,7 @@
- name: verify setup instance in lb - name: verify setup instance in lb
assert: assert:
that: that:
- ip_address|success - ip_address is successful
- name: setup lb rule absent - name: setup lb rule absent
cs_loadbalancer_rule: cs_loadbalancer_rule:
@ -47,7 +47,7 @@
- name: verify setup lb rule absent - name: verify setup lb rule absent
assert: assert:
that: that:
- lb|success - lb is successful
- name: test rule requires params - name: test rule requires params
cs_loadbalancer_rule: cs_loadbalancer_rule:
@ -56,7 +56,7 @@
- name: verify test rule requires params - name: verify test rule requires params
assert: assert:
that: that:
- lb|failed - lb is failed
- "lb.msg.startswith('missing required arguments: ')" - "lb.msg.startswith('missing required arguments: ')"
@ -72,8 +72,8 @@
- name: verify test create rule in check mode - name: verify test create rule in check mode
assert: assert:
that: that:
- lb|success - lb is successful
- lb|changed - lb is changed
- name: test create rule - name: test create rule
cs_loadbalancer_rule: cs_loadbalancer_rule:
@ -86,8 +86,8 @@
- name: verify test create rule - name: verify test create rule
assert: assert:
that: that:
- lb|success - lb is successful
- lb|changed - lb is changed
- lb.name == "{{ cs_resource_prefix }}_lb" - lb.name == "{{ cs_resource_prefix }}_lb"
- lb.algorithm == "roundrobin" - lb.algorithm == "roundrobin"
- lb.public_ip == "{{ ip_address.ip_address }}" - lb.public_ip == "{{ ip_address.ip_address }}"
@ -105,8 +105,8 @@
- name: verify test create rule idempotence - name: verify test create rule idempotence
assert: assert:
that: that:
- lb|success - lb is successful
- not lb|changed - lb is not changed
- lb.name == "{{ cs_resource_prefix }}_lb" - lb.name == "{{ cs_resource_prefix }}_lb"
- lb.algorithm == "roundrobin" - lb.algorithm == "roundrobin"
- lb.public_ip == "{{ ip_address.ip_address }}" - lb.public_ip == "{{ ip_address.ip_address }}"
@ -125,8 +125,8 @@
- name: verify test update rule in check mode - name: verify test update rule in check mode
assert: assert:
that: that:
- lb|success - lb is successful
- lb|changed - lb is changed
- lb.name == "{{ cs_resource_prefix }}_lb" - lb.name == "{{ cs_resource_prefix }}_lb"
- lb.algorithm == "roundrobin" - lb.algorithm == "roundrobin"
- lb.public_ip == "{{ ip_address.ip_address }}" - lb.public_ip == "{{ ip_address.ip_address }}"
@ -144,8 +144,8 @@
- name: verify test update rule - name: verify test update rule
assert: assert:
that: that:
- lb|success - lb is successful
- lb|changed - lb is changed
- lb.name == "{{ cs_resource_prefix }}_lb" - lb.name == "{{ cs_resource_prefix }}_lb"
- lb.algorithm == "source" - lb.algorithm == "source"
- lb.public_ip == "{{ ip_address.ip_address }}" - lb.public_ip == "{{ ip_address.ip_address }}"
@ -163,8 +163,8 @@
- name: verify test update rule idempotence - name: verify test update rule idempotence
assert: assert:
that: that:
- lb|success - lb is successful
- not lb|changed - lb is not changed
- lb.name == "{{ cs_resource_prefix }}_lb" - lb.name == "{{ cs_resource_prefix }}_lb"
- lb.algorithm == "source" - lb.algorithm == "source"
- lb.public_ip == "{{ ip_address.ip_address }}" - lb.public_ip == "{{ ip_address.ip_address }}"
@ -178,7 +178,7 @@
- name: verify test rule requires params - name: verify test rule requires params
assert: assert:
that: that:
- lb|failed - lb is failed
- "lb.msg.startswith('missing required arguments: ')" - "lb.msg.startswith('missing required arguments: ')"
- name: test add members to rule in check mode - name: test add members to rule in check mode
@ -190,8 +190,8 @@
- name: verify add members to rule in check mode - name: verify add members to rule in check mode
assert: assert:
that: that:
- lb|success - lb is successful
- lb|changed - lb is changed
- lb.name == "{{ cs_resource_prefix }}_lb" - lb.name == "{{ cs_resource_prefix }}_lb"
- lb.algorithm == "source" - lb.algorithm == "source"
- lb.public_ip == "{{ ip_address.ip_address }}" - lb.public_ip == "{{ ip_address.ip_address }}"
@ -207,8 +207,8 @@
- name: verify add members to rule - name: verify add members to rule
assert: assert:
that: that:
- lb|success - lb is successful
- lb|changed - lb is changed
- lb.name == "{{ cs_resource_prefix }}_lb" - lb.name == "{{ cs_resource_prefix }}_lb"
- lb.algorithm == "source" - lb.algorithm == "source"
- lb.public_ip == "{{ ip_address.ip_address }}" - lb.public_ip == "{{ ip_address.ip_address }}"
@ -224,8 +224,8 @@
- name: verify add members to rule idempotence - name: verify add members to rule idempotence
assert: assert:
that: that:
- lb|success - lb is successful
- not lb|changed - lb is not changed
- lb.name == "{{ cs_resource_prefix }}_lb" - lb.name == "{{ cs_resource_prefix }}_lb"
- lb.algorithm == "source" - lb.algorithm == "source"
- lb.public_ip == "{{ ip_address.ip_address }}" - lb.public_ip == "{{ ip_address.ip_address }}"
@ -243,8 +243,8 @@
- name: verify remove members to rule in check mode - name: verify remove members to rule in check mode
assert: assert:
that: that:
- lb|success - lb is successful
- lb|changed - lb is changed
- lb.name == "{{ cs_resource_prefix }}_lb" - lb.name == "{{ cs_resource_prefix }}_lb"
- lb.algorithm == "source" - lb.algorithm == "source"
- lb.public_ip == "{{ ip_address.ip_address }}" - lb.public_ip == "{{ ip_address.ip_address }}"
@ -261,8 +261,8 @@
- name: verify remove members to rule - name: verify remove members to rule
assert: assert:
that: that:
- lb|success - lb is successful
- lb|changed - lb is changed
- lb.name == "{{ cs_resource_prefix }}_lb" - lb.name == "{{ cs_resource_prefix }}_lb"
- lb.algorithm == "source" - lb.algorithm == "source"
- lb.public_ip == "{{ ip_address.ip_address }}" - lb.public_ip == "{{ ip_address.ip_address }}"
@ -279,8 +279,8 @@
- name: verify remove members to rule - name: verify remove members to rule
assert: assert:
that: that:
- lb|success - lb is successful
- not lb|changed - lb is not changed
- name: test remove rule in check mode - name: test remove rule in check mode
cs_loadbalancer_rule: cs_loadbalancer_rule:
@ -292,8 +292,8 @@
- name: verify remove rule in check mode - name: verify remove rule in check mode
assert: assert:
that: that:
- lb|success - lb is successful
- lb|changed - lb is changed
- lb.name == "{{ cs_resource_prefix }}_lb" - lb.name == "{{ cs_resource_prefix }}_lb"
- lb.algorithm == "source" - lb.algorithm == "source"
- lb.public_ip == "{{ ip_address.ip_address }}" - lb.public_ip == "{{ ip_address.ip_address }}"
@ -309,8 +309,8 @@
- name: verify remove rule - name: verify remove rule
assert: assert:
that: that:
- lb|success - lb is successful
- lb|changed - lb is changed
- lb.name == "{{ cs_resource_prefix }}_lb" - lb.name == "{{ cs_resource_prefix }}_lb"
- lb.algorithm == "source" - lb.algorithm == "source"
- lb.public_ip == "{{ ip_address.ip_address }}" - lb.public_ip == "{{ ip_address.ip_address }}"
@ -326,5 +326,5 @@
- name: verify remove rule idempotence - name: verify remove rule idempotence
assert: assert:
that: that:
- lb|success - lb is successful
- not lb|changed - lb is not changed

@ -9,7 +9,7 @@
- name: verify setup vpc - name: verify setup vpc
assert: assert:
that: that:
- vpc|success - vpc is successful
- name: setup network acl absent - name: setup network acl absent
cs_network_acl: cs_network_acl:
@ -21,7 +21,7 @@
- name: verify setup network acl absent - name: verify setup network acl absent
assert: assert:
that: that:
- acl|success - acl is successful
- name: test fail missing param name and vpc for network acl - name: test fail missing param name and vpc for network acl
cs_network_acl: cs_network_acl:
@ -30,7 +30,7 @@
- name: verify test fail missing param name and vpc for network acl - name: verify test fail missing param name and vpc for network acl
assert: assert:
that: that:
- acl|failed - acl is failed
- "acl.msg.startswith('missing required arguments: ')" - "acl.msg.startswith('missing required arguments: ')"
- name: test create network acl in check mode - name: test create network acl in check mode
@ -43,8 +43,8 @@
- name: verify test create network acl in check mode - name: verify test create network acl in check mode
assert: assert:
that: that:
- acl|success - acl is successful
- acl|changed - acl is changed
- name: test create network acl - name: test create network acl
cs_network_acl: cs_network_acl:
@ -55,8 +55,8 @@
- name: verify test create network acl - name: verify test create network acl
assert: assert:
that: that:
- acl|success - acl is successful
- acl|changed - acl is changed
- acl.vpc == "{{ cs_resource_prefix }}_vpc" - acl.vpc == "{{ cs_resource_prefix }}_vpc"
- acl.name == "{{ cs_resource_prefix }}_acl" - acl.name == "{{ cs_resource_prefix }}_acl"
@ -69,8 +69,8 @@
- name: verify test create network acl idempotence - name: verify test create network acl idempotence
assert: assert:
that: that:
- acl|success - acl is successful
- not acl|changed - acl is not changed
- acl.vpc == "{{ cs_resource_prefix }}_vpc" - acl.vpc == "{{ cs_resource_prefix }}_vpc"
- acl.name == "{{ cs_resource_prefix }}_acl" - acl.name == "{{ cs_resource_prefix }}_acl"
@ -85,8 +85,8 @@
- name: verify test remove network acl in check mode - name: verify test remove network acl in check mode
assert: assert:
that: that:
- acl|success - acl is successful
- acl|changed - acl is changed
- acl.vpc == "{{ cs_resource_prefix }}_vpc" - acl.vpc == "{{ cs_resource_prefix }}_vpc"
- acl.name == "{{ cs_resource_prefix }}_acl" - acl.name == "{{ cs_resource_prefix }}_acl"
@ -100,8 +100,8 @@
- name: verify test remove network acl - name: verify test remove network acl
assert: assert:
that: that:
- acl|success - acl is successful
- acl|changed - acl is changed
- acl.vpc == "{{ cs_resource_prefix }}_vpc" - acl.vpc == "{{ cs_resource_prefix }}_vpc"
- acl.name == "{{ cs_resource_prefix }}_acl" - acl.name == "{{ cs_resource_prefix }}_acl"
@ -115,5 +115,5 @@
- name: verify test remove network acl idempotence - name: verify test remove network acl idempotence
assert: assert:
that: that:
- acl|success - acl is successful
- not acl|changed - acl is not changed

@ -9,7 +9,7 @@
- name: verify setup vpc - name: verify setup vpc
assert: assert:
that: that:
- vpc|success - vpc is successful
- name: setup network acl - name: setup network acl
cs_network_acl: cs_network_acl:
@ -20,7 +20,7 @@
- name: verify setup network acl - name: verify setup network acl
assert: assert:
that: that:
- acl|success - acl is successful
- name: setup network acl rule - name: setup network acl rule
cs_network_acl_rule: cs_network_acl_rule:
@ -33,7 +33,7 @@
- name: verify setup network acl rule - name: verify setup network acl rule
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- name: test fail missing params - name: test fail missing params
cs_network_acl_rule: cs_network_acl_rule:
@ -42,7 +42,7 @@
- name: verify test fail missing param - name: verify test fail missing param
assert: assert:
that: that:
- acl_rule|failed - acl_rule is failed
- "acl_rule.msg.startswith('missing required arguments: ')" - "acl_rule.msg.startswith('missing required arguments: ')"
- name: test fail missing params for tcp - name: test fail missing params for tcp
@ -59,7 +59,7 @@
- name: verify test fail missing param for tcp - name: verify test fail missing param for tcp
assert: assert:
that: that:
- acl_rule|failed - acl_rule is failed
- "acl_rule.msg == 'protocol is tcp but the following are missing: start_port, end_port'" - "acl_rule.msg == 'protocol is tcp but the following are missing: start_port, end_port'"
- name: test fail missing params for icmp - name: test fail missing params for icmp
@ -77,7 +77,7 @@
- name: verify test fail missing param for icmp - name: verify test fail missing param for icmp
assert: assert:
that: that:
- acl_rule|failed - acl_rule is failed
- "acl_rule.msg == 'protocol is icmp but the following are missing: icmp_type, icmp_code'" - "acl_rule.msg == 'protocol is icmp but the following are missing: icmp_type, icmp_code'"
- name: test fail missing params for by number - name: test fail missing params for by number
@ -95,7 +95,7 @@
- name: verify test fail missing param for by number - name: verify test fail missing param for by number
assert: assert:
that: that:
- acl_rule|failed - acl_rule is failed
- "acl_rule.msg == 'protocol is by_number but the following are missing: protocol_number'" - "acl_rule.msg == 'protocol is by_number but the following are missing: protocol_number'"
- name: test create network acl rule in check mode - name: test create network acl rule in check mode
@ -113,8 +113,8 @@
- name: verify test create network acl rule in check mode - name: verify test create network acl rule in check mode
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- acl_rule|changed - acl_rule is changed
- name: test create network acl rule - name: test create network acl rule
cs_network_acl_rule: cs_network_acl_rule:
@ -130,8 +130,8 @@
- name: verify test create network acl rule - name: verify test create network acl rule
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- acl_rule|changed - acl_rule is changed
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc" - acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl" - acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
- acl_rule.start_port == 80 - acl_rule.start_port == 80
@ -155,8 +155,8 @@
- name: verify test create network acl idempotence - name: verify test create network acl idempotence
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- not acl_rule|changed - acl_rule is not changed
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc" - acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl" - acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
- acl_rule.start_port == 80 - acl_rule.start_port == 80
@ -181,8 +181,8 @@
- name: verify test change network acl rule in check mode - name: verify test change network acl rule in check mode
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- acl_rule|changed - acl_rule is changed
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc" - acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl" - acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
- acl_rule.start_port == 80 - acl_rule.start_port == 80
@ -207,8 +207,8 @@
- name: verify test change network acl rule - name: verify test change network acl rule
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- acl_rule|changed - acl_rule is changed
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc" - acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl" - acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
- acl_rule.start_port == 81 - acl_rule.start_port == 81
@ -234,8 +234,8 @@
- name: verify test change network acl idempotence - name: verify test change network acl idempotence
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- not acl_rule|changed - acl_rule is not changed
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc" - acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl" - acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
- acl_rule.start_port == 81 - acl_rule.start_port == 81
@ -263,8 +263,8 @@
- name: verify test change network acl by protocol number in check mode - name: verify test change network acl by protocol number in check mode
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- acl_rule|changed - acl_rule is changed
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc" - acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl" - acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
- acl_rule.start_port == 81 - acl_rule.start_port == 81
@ -291,8 +291,8 @@
- name: verify test change network acl by protocol number - name: verify test change network acl by protocol number
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- acl_rule|changed - acl_rule is changed
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc" - acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl" - acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
- acl_rule.start_port == 81 - acl_rule.start_port == 81
@ -320,8 +320,8 @@
- name: verify test change network acl by protocol number idempotence - name: verify test change network acl by protocol number idempotence
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- not acl_rule|changed - acl_rule is not changed
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc" - acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl" - acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
- acl_rule.start_port == 81 - acl_rule.start_port == 81
@ -349,8 +349,8 @@
- name: verify test create 2nd network acl rule in check mode - name: verify test create 2nd network acl rule in check mode
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- acl_rule|changed - acl_rule is changed
- name: test create 2nd network acl rule - name: test create 2nd network acl rule
cs_network_acl_rule: cs_network_acl_rule:
@ -366,8 +366,8 @@
- name: verify test create 2nd network acl rule - name: verify test create 2nd network acl rule
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- acl_rule|changed - acl_rule is changed
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc" - acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl" - acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
- acl_rule.action_policy == "allow" - acl_rule.action_policy == "allow"
@ -390,8 +390,8 @@
- name: verify test create 2nd network acl rule idempotence - name: verify test create 2nd network acl rule idempotence
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- not acl_rule|changed - acl_rule is not changed
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc" - acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl" - acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
- acl_rule.action_policy == "allow" - acl_rule.action_policy == "allow"
@ -416,8 +416,8 @@
- name: verify test create 2nd network acl rule - name: verify test create 2nd network acl rule
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- acl_rule|changed - acl_rule is changed
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc" - acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl" - acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
- acl_rule.action_policy == "allow" - acl_rule.action_policy == "allow"
@ -444,8 +444,8 @@
- name: verify test create 2nd network acl rule idempotence - name: verify test create 2nd network acl rule idempotence
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- not acl_rule|changed - acl_rule is not changed
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc" - acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl" - acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
- acl_rule.action_policy == "allow" - acl_rule.action_policy == "allow"
@ -468,8 +468,8 @@
- name: verify test absent network acl rule in check mode - name: verify test absent network acl rule in check mode
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- acl_rule|changed - acl_rule is changed
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc" - acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl" - acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
- acl_rule.start_port == 81 - acl_rule.start_port == 81
@ -490,8 +490,8 @@
- name: verify test absent network acl rule - name: verify test absent network acl rule
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- acl_rule|changed - acl_rule is changed
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc" - acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl" - acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
- acl_rule.start_port == 81 - acl_rule.start_port == 81
@ -512,8 +512,8 @@
- name: verify test absent network acl rule idempotence - name: verify test absent network acl rule idempotence
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- not acl_rule|changed - acl_rule is not changed
- name: test absent 2nd network acl rule - name: test absent 2nd network acl rule
cs_network_acl_rule: cs_network_acl_rule:
@ -526,8 +526,8 @@
- name: verify test absent 2nd network acl rule - name: verify test absent 2nd network acl rule
assert: assert:
that: that:
- acl_rule|success - acl_rule is successful
- acl_rule|changed - acl_rule is changed
- acl_rule.vpc == "{{ cs_resource_prefix }}_vpc" - acl_rule.vpc == "{{ cs_resource_prefix }}_vpc"
- acl_rule.network_acl == "{{ cs_resource_prefix }}_acl" - acl_rule.network_acl == "{{ cs_resource_prefix }}_acl"
- acl_rule.action_policy == "allow" - acl_rule.action_policy == "allow"

@ -9,7 +9,7 @@
- name: verify setup zone is present - name: verify setup zone is present
assert: assert:
that: that:
- zone|success - zone is successful
- name: setup pod is absent - name: setup pod is absent
cs_pod: cs_pod:
@ -20,7 +20,7 @@
- name: verify setup pod is absent - name: verify setup pod is absent
assert: assert:
that: that:
- pod|success - pod is successful
- name: test fail if missing name - name: test fail if missing name
cs_pod: cs_pod:
@ -29,7 +29,7 @@
- name: verify results of fail if missing name - name: verify results of fail if missing name
assert: assert:
that: that:
- pod|failed - pod is failed
- "pod.msg == 'missing required arguments: name'" - "pod.msg == 'missing required arguments: name'"
@ -45,7 +45,7 @@
- name: verify test create pod in check mode - name: verify test create pod in check mode
assert: assert:
that: that:
- pod_origin|changed - pod_origin is changed
- pod_origin.zone == "{{ cs_resource_prefix }}-zone" - pod_origin.zone == "{{ cs_resource_prefix }}-zone"
- name: test create pod - name: test create pod
@ -59,7 +59,7 @@
- name: verify test create pod - name: verify test create pod
assert: assert:
that: that:
- pod_origin|changed - pod_origin is changed
- pod_origin.allocation_state == "Enabled" - pod_origin.allocation_state == "Enabled"
- pod_origin.start_ip == "10.100.10.101" - pod_origin.start_ip == "10.100.10.101"
- pod_origin.end_ip == "10.100.10.254" - pod_origin.end_ip == "10.100.10.254"
@ -78,7 +78,7 @@
- name: verify test create pod idempotence - name: verify test create pod idempotence
assert: assert:
that: that:
- not pod|changed - pod is not changed
- pod.allocation_state == "Enabled" - pod.allocation_state == "Enabled"
- pod.start_ip == "10.100.10.101" - pod.start_ip == "10.100.10.101"
- pod.end_ip == "10.100.10.254" - pod.end_ip == "10.100.10.254"
@ -98,7 +98,7 @@
- name: verify test update pod in check mode - name: verify test update pod in check mode
assert: assert:
that: that:
- pod|changed - pod is changed
- pod.allocation_state == "Enabled" - pod.allocation_state == "Enabled"
- pod.start_ip == "10.100.10.101" - pod.start_ip == "10.100.10.101"
- pod.end_ip == "10.100.10.254" - pod.end_ip == "10.100.10.254"
@ -117,7 +117,7 @@
- name: verify test update pod - name: verify test update pod
assert: assert:
that: that:
- pod|changed - pod is changed
- pod.allocation_state == "Enabled" - pod.allocation_state == "Enabled"
- pod.start_ip == "10.100.10.102" - pod.start_ip == "10.100.10.102"
- pod.end_ip == "10.100.10.254" - pod.end_ip == "10.100.10.254"
@ -136,7 +136,7 @@
- name: verify test update pod idempotence - name: verify test update pod idempotence
assert: assert:
that: that:
- not pod|changed - pod is not changed
- pod.allocation_state == "Enabled" - pod.allocation_state == "Enabled"
- pod.start_ip == "10.100.10.102" - pod.start_ip == "10.100.10.102"
- pod.end_ip == "10.100.10.254" - pod.end_ip == "10.100.10.254"
@ -154,7 +154,7 @@
- name: verify test enable pod in check mode - name: verify test enable pod in check mode
assert: assert:
that: that:
- pod|changed - pod is changed
- pod.allocation_state == "Enabled" - pod.allocation_state == "Enabled"
- pod.id == pod_origin.id - pod.id == pod_origin.id
- pod.start_ip == "10.100.10.102" - pod.start_ip == "10.100.10.102"
@ -172,7 +172,7 @@
- name: verify test enable pod - name: verify test enable pod
assert: assert:
that: that:
- pod|changed - pod is changed
- pod.allocation_state == "Disabled" - pod.allocation_state == "Disabled"
- pod.id == pod_origin.id - pod.id == pod_origin.id
- pod.start_ip == "10.100.10.102" - pod.start_ip == "10.100.10.102"
@ -190,7 +190,7 @@
- name: verify test enable pod idempotence - name: verify test enable pod idempotence
assert: assert:
that: that:
- not pod|changed - pod is not changed
- pod.allocation_state == "Disabled" - pod.allocation_state == "Disabled"
- pod.id == pod_origin.id - pod.id == pod_origin.id
- pod.start_ip == "10.100.10.102" - pod.start_ip == "10.100.10.102"
@ -209,7 +209,7 @@
- name: verify test disable pod in check mode - name: verify test disable pod in check mode
assert: assert:
that: that:
- pod|changed - pod is changed
- pod.allocation_state == "Disabled" - pod.allocation_state == "Disabled"
- pod.id == pod_origin.id - pod.id == pod_origin.id
- pod.start_ip == "10.100.10.102" - pod.start_ip == "10.100.10.102"
@ -227,7 +227,7 @@
- name: verify test disable pod - name: verify test disable pod
assert: assert:
that: that:
- pod|changed - pod is changed
- pod.allocation_state == "Enabled" - pod.allocation_state == "Enabled"
- pod.id == pod_origin.id - pod.id == pod_origin.id
- pod.start_ip == "10.100.10.102" - pod.start_ip == "10.100.10.102"
@ -246,7 +246,7 @@
- name: verify test enabled pod idempotence - name: verify test enabled pod idempotence
assert: assert:
that: that:
- not pod|changed - pod is not changed
- pod.allocation_state == "Enabled" - pod.allocation_state == "Enabled"
- pod.id == pod_origin.id - pod.id == pod_origin.id
- pod.start_ip == "10.100.10.102" - pod.start_ip == "10.100.10.102"
@ -265,7 +265,7 @@
- name: verify test create pod in check mode - name: verify test create pod in check mode
assert: assert:
that: that:
- pod|changed - pod is changed
- pod.id == pod_origin.id - pod.id == pod_origin.id
- pod.allocation_state == "Enabled" - pod.allocation_state == "Enabled"
- pod.start_ip == "10.100.10.102" - pod.start_ip == "10.100.10.102"
@ -283,7 +283,7 @@
- name: verify test create pod - name: verify test create pod
assert: assert:
that: that:
- pod|changed - pod is changed
- pod.id == pod_origin.id - pod.id == pod_origin.id
- pod.allocation_state == "Enabled" - pod.allocation_state == "Enabled"
- pod.start_ip == "10.100.10.102" - pod.start_ip == "10.100.10.102"
@ -301,4 +301,4 @@
- name: verify test absent pod idempotence - name: verify test absent pod idempotence
assert: assert:
that: that:
- not pod|changed - pod is not changed

@ -9,7 +9,7 @@
- name: verify network setup - name: verify network setup
assert: assert:
that: that:
- net|success - net is successful
- name: instance setup - name: instance setup
cs_instance: cs_instance:
@ -22,7 +22,7 @@
- name: verify instance setup - name: verify instance setup
assert: assert:
that: that:
- instance|success - instance is successful
- name: public ip address setup - name: public ip address setup
cs_ip_address: cs_ip_address:
@ -32,7 +32,7 @@
- name: verify public ip address setup - name: verify public ip address setup
assert: assert:
that: that:
- ip_address|success - ip_address is successful
- name: set ip address as fact - name: set ip address as fact
set_fact: set_fact:
@ -49,7 +49,7 @@
- name: verify clear existing port forwarding - name: verify clear existing port forwarding
assert: assert:
that: that:
- pf|success - pf is successful
- name: test fail if missing params - name: test fail if missing params
action: cs_portforward action: cs_portforward
@ -58,7 +58,7 @@
- name: verify results of fail if missing params - name: verify results of fail if missing params
assert: assert:
that: that:
- pf|failed - pf is failed
- 'pf.msg.startswith("missing required arguments: ")' - 'pf.msg.startswith("missing required arguments: ")'
- name: test present port forwarding in check mode - name: test present port forwarding in check mode
@ -73,8 +73,8 @@
- name: verify results of present port forwarding in check mode - name: verify results of present port forwarding in check mode
assert: assert:
that: that:
- pf|success - pf is successful
- pf|changed - pf is changed
- name: test present port forwarding - name: test present port forwarding
cs_portforward: cs_portforward:
@ -87,8 +87,8 @@
- name: verify results of present port forwarding - name: verify results of present port forwarding
assert: assert:
that: that:
- pf|success - pf is successful
- pf|changed - pf is changed
- pf.vm_name == "{{ cs_portforward_vm }}" - pf.vm_name == "{{ cs_portforward_vm }}"
- pf.ip_address == "{{ cs_portforward_public_ip }}" - pf.ip_address == "{{ cs_portforward_public_ip }}"
- pf.public_port == 80 - pf.public_port == 80
@ -107,8 +107,8 @@
- name: verify results of present port forwarding idempotence - name: verify results of present port forwarding idempotence
assert: assert:
that: that:
- pf|success - pf is successful
- not pf|changed - pf is not changed
- pf.vm_name == "{{ cs_portforward_vm }}" - pf.vm_name == "{{ cs_portforward_vm }}"
- pf.ip_address == "{{ cs_portforward_public_ip }}" - pf.ip_address == "{{ cs_portforward_public_ip }}"
- pf.public_port == 80 - pf.public_port == 80
@ -128,8 +128,8 @@
- name: verify results of change port forwarding in check mode - name: verify results of change port forwarding in check mode
assert: assert:
that: that:
- pf|success - pf is successful
- pf|changed - pf is changed
- pf.vm_name == "{{ cs_portforward_vm }}" - pf.vm_name == "{{ cs_portforward_vm }}"
- pf.ip_address == "{{ cs_portforward_public_ip }}" - pf.ip_address == "{{ cs_portforward_public_ip }}"
- pf.public_port == 80 - pf.public_port == 80
@ -148,8 +148,8 @@
- name: verify results of change port forwarding - name: verify results of change port forwarding
assert: assert:
that: that:
- pf|success - pf is successful
- pf|changed - pf is changed
- pf.vm_name == "{{ cs_portforward_vm }}" - pf.vm_name == "{{ cs_portforward_vm }}"
- pf.ip_address == "{{ cs_portforward_public_ip }}" - pf.ip_address == "{{ cs_portforward_public_ip }}"
- pf.public_port == 80 - pf.public_port == 80
@ -168,8 +168,8 @@
- name: verify results of change port forwarding idempotence - name: verify results of change port forwarding idempotence
assert: assert:
that: that:
- pf|success - pf is successful
- not pf|changed - pf is not changed
- pf.vm_name == "{{ cs_portforward_vm }}" - pf.vm_name == "{{ cs_portforward_vm }}"
- pf.ip_address == "{{ cs_portforward_public_ip }}" - pf.ip_address == "{{ cs_portforward_public_ip }}"
- pf.public_port == 80 - pf.public_port == 80
@ -189,8 +189,8 @@
- name: verify results of absent port forwarding in check mode - name: verify results of absent port forwarding in check mode
assert: assert:
that: that:
- pf|success - pf is successful
- pf|changed - pf is changed
- pf.vm_name == "{{ cs_portforward_vm }}" - pf.vm_name == "{{ cs_portforward_vm }}"
- pf.ip_address == "{{ cs_portforward_public_ip }}" - pf.ip_address == "{{ cs_portforward_public_ip }}"
- pf.public_port == 80 - pf.public_port == 80
@ -209,8 +209,8 @@
- name: verify results of absent port forwarding - name: verify results of absent port forwarding
assert: assert:
that: that:
- pf|success - pf is successful
- pf|changed - pf is changed
- pf.vm_name == "{{ cs_portforward_vm }}" - pf.vm_name == "{{ cs_portforward_vm }}"
- pf.ip_address == "{{ cs_portforward_public_ip }}" - pf.ip_address == "{{ cs_portforward_public_ip }}"
- pf.public_port == 80 - pf.public_port == 80
@ -229,8 +229,8 @@
- name: verify results of absent port forwarding idempotence - name: verify results of absent port forwarding idempotence
assert: assert:
that: that:
- pf|success - pf is successful
- not pf|changed - pf is not changed
- name: instance cleanup - name: instance cleanup
cs_instance: cs_instance:
@ -241,7 +241,7 @@
- name: verify instance cleanup - name: verify instance cleanup
assert: assert:
that: that:
- instance|success - instance is successful
- name: network cleanup - name: network cleanup
cs_network: cs_network:
@ -252,4 +252,4 @@
- name: verify network cleanup - name: verify network cleanup
assert: assert:
that: that:
- net|success - net is successful

@ -7,7 +7,7 @@
- name: verify project did not exist - name: verify project did not exist
assert: assert:
that: that:
- prj|success - prj is successful
- name: test create project in check mode - name: test create project in check mode
cs_project: cs_project:
@ -17,7 +17,7 @@
- name: verify test create project in check mode - name: verify test create project in check mode
assert: assert:
that: that:
- prj|changed - prj is changed
- name: test create project - name: test create project
cs_project: cs_project:
@ -26,7 +26,7 @@
- name: verify test create project - name: verify test create project
assert: assert:
that: that:
- prj|changed - prj is changed
- prj.name == "{{ cs_resource_prefix }}-prj" - prj.name == "{{ cs_resource_prefix }}-prj"
- name: test create project idempotence - name: test create project idempotence
@ -36,7 +36,7 @@
- name: verify test create project idempotence - name: verify test create project idempotence
assert: assert:
that: that:
- not prj|changed - prj is not changed
- prj.name == "{{ cs_resource_prefix }}-prj" - prj.name == "{{ cs_resource_prefix }}-prj"
- name: test suspend project in check mode - name: test suspend project in check mode
@ -48,7 +48,7 @@
- name: verify test suspend project in check mode - name: verify test suspend project in check mode
assert: assert:
that: that:
- prj|changed - prj is changed
- prj.name == "{{ cs_resource_prefix }}-prj" - prj.name == "{{ cs_resource_prefix }}-prj"
- prj.state != "Suspended" - prj.state != "Suspended"
@ -60,7 +60,7 @@
- name: verify test suspend project - name: verify test suspend project
assert: assert:
that: that:
- prj|changed - prj is changed
- prj.name == "{{ cs_resource_prefix }}-prj" - prj.name == "{{ cs_resource_prefix }}-prj"
- prj.state == "Suspended" - prj.state == "Suspended"
@ -72,7 +72,7 @@
- name: verify test suspend project idempotence - name: verify test suspend project idempotence
assert: assert:
that: that:
- not prj|changed - prj is not changed
- prj.name == "{{ cs_resource_prefix }}-prj" - prj.name == "{{ cs_resource_prefix }}-prj"
- prj.state == "Suspended" - prj.state == "Suspended"
@ -85,7 +85,7 @@
- name: verify test activate project in check mode - name: verify test activate project in check mode
assert: assert:
that: that:
- prj|changed - prj is changed
- prj.name == "{{ cs_resource_prefix }}-prj" - prj.name == "{{ cs_resource_prefix }}-prj"
- prj.state != "Active" - prj.state != "Active"
@ -97,7 +97,7 @@
- name: verify test activate project - name: verify test activate project
assert: assert:
that: that:
- prj|changed - prj is changed
- prj.name == "{{ cs_resource_prefix }}-prj" - prj.name == "{{ cs_resource_prefix }}-prj"
- prj.state == "Active" - prj.state == "Active"
@ -109,7 +109,7 @@
- name: verify test activate project idempotence - name: verify test activate project idempotence
assert: assert:
that: that:
- not prj|changed - prj is not changed
- prj.name == "{{ cs_resource_prefix }}-prj" - prj.name == "{{ cs_resource_prefix }}-prj"
- prj.state == "Active" - prj.state == "Active"
@ -122,7 +122,7 @@
- name: verify test delete project in check mode - name: verify test delete project in check mode
assert: assert:
that: that:
- prj|changed - prj is changed
- prj.name == "{{ cs_resource_prefix }}-prj" - prj.name == "{{ cs_resource_prefix }}-prj"
- prj.state == "Active" - prj.state == "Active"
@ -134,7 +134,7 @@
- name: verify test delete project - name: verify test delete project
assert: assert:
that: that:
- prj|changed - prj is changed
- prj.name == "{{ cs_resource_prefix }}-prj" - prj.name == "{{ cs_resource_prefix }}-prj"
- prj.state == "Active" - prj.state == "Active"
@ -146,4 +146,4 @@
- name: verify test delete project idempotence - name: verify test delete project idempotence
assert: assert:
that: that:
- not prj|changed - prj is not changed

@ -7,7 +7,7 @@
- name: verify setup - name: verify setup
assert: assert:
that: that:
- region|success - region is successful
- name: test fail if missing params - name: test fail if missing params
cs_region: cs_region:
@ -16,7 +16,7 @@
- name: verify results of fail if missing name - name: verify results of fail if missing name
assert: assert:
that: that:
- region|failed - region is failed
- "region.msg.startswith('missing required arguments: ')" - "region.msg.startswith('missing required arguments: ')"
- name: test create region in check mode - name: test create region in check mode
@ -29,7 +29,7 @@
- name: verify test create region in check mode - name: verify test create region in check mode
assert: assert:
that: that:
- region|changed - region is changed
- name: test create region in check mode - name: test create region in check mode
cs_region: cs_region:
@ -40,7 +40,7 @@
- name: verify test create region in check mode - name: verify test create region in check mode
assert: assert:
that: that:
- region|changed - region is changed
- region.name == 'geneva' - region.name == 'geneva'
- region.id == 2 - region.id == 2
- region.endpoint == 'https://cloud.gva.example.com' - region.endpoint == 'https://cloud.gva.example.com'
@ -56,7 +56,7 @@
- name: verify test create region idempotence - name: verify test create region idempotence
assert: assert:
that: that:
- not region|changed - region is not changed
- region.name == 'geneva' - region.name == 'geneva'
- region.id == 2 - region.id == 2
- region.endpoint == 'https://cloud.gva.example.com' - region.endpoint == 'https://cloud.gva.example.com'
@ -73,7 +73,7 @@
- name: verify test update region in check mode - name: verify test update region in check mode
assert: assert:
that: that:
- region|changed - region is changed
- region.name == 'geneva' - region.name == 'geneva'
- region.id == 2 - region.id == 2
- region.endpoint == 'https://cloud.gva.example.com' - region.endpoint == 'https://cloud.gva.example.com'
@ -89,7 +89,7 @@
- name: verify test update region - name: verify test update region
assert: assert:
that: that:
- region|changed - region is changed
- region.name == 'zuerich' - region.name == 'zuerich'
- region.id == 2 - region.id == 2
- region.endpoint == 'https://cloud.zrh.example.com' - region.endpoint == 'https://cloud.zrh.example.com'
@ -105,7 +105,7 @@
- name: verify test update region idempotence - name: verify test update region idempotence
assert: assert:
that: that:
- not region|changed - region is not changed
- region.name == 'zuerich' - region.name == 'zuerich'
- region.id == 2 - region.id == 2
- region.endpoint == 'https://cloud.zrh.example.com' - region.endpoint == 'https://cloud.zrh.example.com'
@ -121,7 +121,7 @@
- name: verify test remove region in check mode - name: verify test remove region in check mode
assert: assert:
that: that:
- region|changed - region is changed
- region.name == 'zuerich' - region.name == 'zuerich'
- region.id == 2 - region.id == 2
- region.endpoint == 'https://cloud.zrh.example.com' - region.endpoint == 'https://cloud.zrh.example.com'
@ -136,7 +136,7 @@
- name: verify test remove region - name: verify test remove region
assert: assert:
that: that:
- region|changed - region is changed
- region.name == 'zuerich' - region.name == 'zuerich'
- region.id == 2 - region.id == 2
- region.endpoint == 'https://cloud.zrh.example.com' - region.endpoint == 'https://cloud.zrh.example.com'
@ -151,4 +151,4 @@
- name: verify test remove region idempotence - name: verify test remove region idempotence
assert: assert:
that: that:
- not region|changed - region is not changed

@ -9,7 +9,7 @@
- name: verify setup cpu limits account - name: verify setup cpu limits account
assert: assert:
that: that:
- rl|success - rl is successful
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.account == "{{ cs_resource_prefix }}_user" - rl.account == "{{ cs_resource_prefix }}_user"
- rl.limit == 20 - rl.limit == 20
@ -24,7 +24,7 @@
- name: verify setup cpu limits for domain - name: verify setup cpu limits for domain
assert: assert:
that: that:
- rl|success - rl is successful
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.limit == -1 - rl.limit == -1
- rl.resource_type == "cpu" - rl.resource_type == "cpu"
@ -39,7 +39,7 @@
- name: verify set cpu limits for domain in check mode - name: verify set cpu limits for domain in check mode
assert: assert:
that: that:
- rl|changed - rl is changed
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.limit == -1 - rl.limit == -1
- rl.resource_type == "cpu" - rl.resource_type == "cpu"
@ -53,7 +53,7 @@
- name: verify set cpu limits for domain - name: verify set cpu limits for domain
assert: assert:
that: that:
- rl|changed - rl is changed
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.limit == 12 - rl.limit == 12
- rl.resource_type == "cpu" - rl.resource_type == "cpu"
@ -67,7 +67,7 @@
- name: verify set cpu limits for domain - name: verify set cpu limits for domain
assert: assert:
that: that:
- not rl|changed - rl is not changed
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.limit == 12 - rl.limit == 12
- rl.resource_type == "cpu" - rl.resource_type == "cpu"
@ -83,7 +83,7 @@
- name: verify set cpu limits for account in check mode - name: verify set cpu limits for account in check mode
assert: assert:
that: that:
- rl|changed - rl is changed
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.account == "{{ cs_resource_prefix }}_user" - rl.account == "{{ cs_resource_prefix }}_user"
- rl.limit == 20 - rl.limit == 20
@ -99,7 +99,7 @@
- name: verify set cpu limits for account - name: verify set cpu limits for account
assert: assert:
that: that:
- rl|changed - rl is changed
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.account == "{{ cs_resource_prefix }}_user" - rl.account == "{{ cs_resource_prefix }}_user"
- rl.limit == 10 - rl.limit == 10
@ -115,7 +115,7 @@
- name: verify set cpu limits for account idempotence - name: verify set cpu limits for account idempotence
assert: assert:
that: that:
- not rl|changed - rl is not changed
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.account == "{{ cs_resource_prefix }}_user" - rl.account == "{{ cs_resource_prefix }}_user"
- rl.limit == 10 - rl.limit == 10

@ -9,7 +9,7 @@
- name: verify setup instance limits account - name: verify setup instance limits account
assert: assert:
that: that:
- rl|success - rl is successful
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.account == "{{ cs_resource_prefix }}_user" - rl.account == "{{ cs_resource_prefix }}_user"
- rl.limit == 20 - rl.limit == 20
@ -25,7 +25,7 @@
- name: verify set instance limits for domain in check mode - name: verify set instance limits for domain in check mode
assert: assert:
that: that:
- rl|changed - rl is changed
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.limit == 20 - rl.limit == 20
- rl.resource_type == "instance" - rl.resource_type == "instance"
@ -39,7 +39,7 @@
- name: verify set instance limits for domain - name: verify set instance limits for domain
assert: assert:
that: that:
- rl|changed - rl is changed
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.limit == 12 - rl.limit == 12
- rl.resource_type == "instance" - rl.resource_type == "instance"
@ -53,7 +53,7 @@
- name: verify set instance limits for domain - name: verify set instance limits for domain
assert: assert:
that: that:
- not rl|changed - rl is not changed
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.limit == 12 - rl.limit == 12
- rl.resource_type == "instance" - rl.resource_type == "instance"
@ -69,7 +69,7 @@
- name: verify set instance limits for account in check mode - name: verify set instance limits for account in check mode
assert: assert:
that: that:
- rl|changed - rl is changed
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.account == "{{ cs_resource_prefix }}_user" - rl.account == "{{ cs_resource_prefix }}_user"
- rl.limit != 10 - rl.limit != 10
@ -85,7 +85,7 @@
- name: verify set instance limits for account - name: verify set instance limits for account
assert: assert:
that: that:
- rl|changed - rl is changed
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.account == "{{ cs_resource_prefix }}_user" - rl.account == "{{ cs_resource_prefix }}_user"
- rl.limit == 10 - rl.limit == 10
@ -101,7 +101,7 @@
- name: verify set instance limits for account idempotence - name: verify set instance limits for account idempotence
assert: assert:
that: that:
- not rl|changed - rl is not changed
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.account == "{{ cs_resource_prefix }}_user" - rl.account == "{{ cs_resource_prefix }}_user"
- rl.limit == 10 - rl.limit == 10

@ -5,7 +5,7 @@
- name: verify setup domain - name: verify setup domain
assert: assert:
that: that:
- dom|success - dom is successful
- name: setup account - name: setup account
cs_account: cs_account:
@ -21,7 +21,7 @@
- name: verify setup account - name: verify setup account
assert: assert:
that: that:
- acc|success - acc is successful
- name: test failed unkonwn type - name: test failed unkonwn type
cs_resourcelimit: cs_resourcelimit:
@ -33,7 +33,7 @@
- name: verify test failed unkonwn type - name: verify test failed unkonwn type
assert: assert:
that: that:
- rl|failed - rl is failed
- name: test failed missing type - name: test failed missing type
cs_resourcelimit: cs_resourcelimit:
@ -42,7 +42,7 @@
- name: verify test failed missing type - name: verify test failed missing type
assert: assert:
that: that:
- rl|failed - rl is failed
- name: setup resource limits domain - name: setup resource limits domain
cs_resourcelimit: cs_resourcelimit:
@ -53,7 +53,7 @@
- name: verify setup resource limits domain - name: verify setup resource limits domain
assert: assert:
that: that:
- rl|success - rl is successful
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.limit == 10 - rl.limit == 10
@ -67,8 +67,8 @@
- name: verify setup resource limits domain to 20 in check mode - name: verify setup resource limits domain to 20 in check mode
assert: assert:
that: that:
- rl|success - rl is successful
- rl|changed - rl is changed
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.limit == 10 - rl.limit == 10
@ -81,8 +81,8 @@
- name: verify setup resource limits domain to 20 - name: verify setup resource limits domain to 20
assert: assert:
that: that:
- rl|success - rl is successful
- rl|changed - rl is changed
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.limit == 20 - rl.limit == 20
@ -95,8 +95,8 @@
- name: verify setup resource limits domain to 20 idempotence - name: verify setup resource limits domain to 20 idempotence
assert: assert:
that: that:
- rl|success - rl is successful
- not rl|changed - rl is not changed
- rl.domain == "{{ cs_resource_prefix }}-domain" - rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.limit == 20 - rl.limit == 20

@ -7,7 +7,7 @@
- name: verify setup - name: verify setup
assert: assert:
that: that:
- role|success - role is successful
- name: test fail if missing params - name: test fail if missing params
cs_role: cs_role:
@ -16,7 +16,7 @@
- name: verifytest fail if missing params - name: verifytest fail if missing params
assert: assert:
that: that:
- role|failed - role is failed
- "role.msg.startswith('missing required arguments: ')" - "role.msg.startswith('missing required arguments: ')"
- name: test create role in check mode - name: test create role in check mode
@ -28,7 +28,7 @@
- name: verify test create role in check mode - name: verify test create role in check mode
assert: assert:
that: that:
- role|changed - role is changed
- name: test create role - name: test create role
cs_role: cs_role:
@ -38,7 +38,7 @@
- name: verify test create role - name: verify test create role
assert: assert:
that: that:
- role|changed - role is changed
- role.name == '{{ cs_resource_prefix }}-role' - role.name == '{{ cs_resource_prefix }}-role'
- role.role_type == 'DomainAdmin' - role.role_type == 'DomainAdmin'
@ -50,7 +50,7 @@
- name: verify test create role idempotence - name: verify test create role idempotence
assert: assert:
that: that:
- not role|changed - role is not changed
- role.name == '{{ cs_resource_prefix }}-role' - role.name == '{{ cs_resource_prefix }}-role'
- role.role_type == 'DomainAdmin' - role.role_type == 'DomainAdmin'
@ -64,7 +64,7 @@
- name: verify test update role in check mode - name: verify test update role in check mode
assert: assert:
that: that:
- role|changed - role is changed
- role.name == '{{ cs_resource_prefix }}-role' - role.name == '{{ cs_resource_prefix }}-role'
- "role.description is not defined" - "role.description is not defined"
- role.role_type == 'DomainAdmin' - role.role_type == 'DomainAdmin'
@ -78,7 +78,7 @@
- name: verify test update role - name: verify test update role
assert: assert:
that: that:
- role|changed - role is changed
- role.name == '{{ cs_resource_prefix }}-role' - role.name == '{{ cs_resource_prefix }}-role'
- role.description == '{{ cs_resource_prefix }}-role-description' - role.description == '{{ cs_resource_prefix }}-role-description'
- role.role_type == 'DomainAdmin' - role.role_type == 'DomainAdmin'
@ -91,7 +91,7 @@
- name: verify test update role idempotence - name: verify test update role idempotence
assert: assert:
that: that:
- not role|changed - role is not changed
- role.name == '{{ cs_resource_prefix }}-role' - role.name == '{{ cs_resource_prefix }}-role'
- role.description == '{{ cs_resource_prefix }}-role-description' - role.description == '{{ cs_resource_prefix }}-role-description'
- role.role_type == 'DomainAdmin' - role.role_type == 'DomainAdmin'
@ -105,7 +105,7 @@
- name: verify test remove role in check mode - name: verify test remove role in check mode
assert: assert:
that: that:
- role|changed - role is changed
- role.name == '{{ cs_resource_prefix }}-role' - role.name == '{{ cs_resource_prefix }}-role'
- role.role_type == 'DomainAdmin' - role.role_type == 'DomainAdmin'
@ -117,7 +117,7 @@
- name: verify test remove role - name: verify test remove role
assert: assert:
that: that:
- role|changed - role is changed
- name: test remove role idempotence - name: test remove role idempotence
cs_role: cs_role:
@ -127,4 +127,4 @@
- name: verify test remove role idempotence - name: verify test remove role idempotence
assert: assert:
that: that:
- not role|changed - role is not changed

@ -14,7 +14,7 @@
- name: verify setup network - name: verify setup network
assert: assert:
that: that:
- net|success - net is successful
- net.name == "net_router" - net.name == "net_router"
- name: setup instance - name: setup instance
@ -29,7 +29,7 @@
- name: verify setup instance - name: verify setup instance
assert: assert:
that: that:
- instance|success - instance is successful
- instance.name == "instance-vm" - instance.name == "instance-vm"
- instance.state == "Running" - instance.state == "Running"
@ -45,7 +45,7 @@
- name: verify setup instance - name: verify setup instance
assert: assert:
that: that:
- instance|success - instance is successful
- instance.name == "instance-vm" - instance.name == "instance-vm"
- instance.state == "Running" - instance.state == "Running"
@ -73,7 +73,7 @@
- name: verify test router started - name: verify test router started
assert: assert:
that: that:
- router|success - router is successful
- name: test stop router in check mode - name: test stop router in check mode
cs_router: cs_router:
@ -85,7 +85,7 @@
- name: verify test stop router in check mode - name: verify test stop router in check mode
assert: assert:
that: that:
- router|changed - router is changed
- router.state == "Running" - router.state == "Running"
- router.service_offering == "System Offering For Software Router" - router.service_offering == "System Offering For Software Router"
@ -98,7 +98,7 @@
- name: verify test stop router - name: verify test stop router
assert: assert:
that: that:
- router|changed - router is changed
- router.state == "Stopped" - router.state == "Stopped"
- router.service_offering == "System Offering For Software Router" - router.service_offering == "System Offering For Software Router"
@ -111,7 +111,7 @@
- name: verify test stop router idempotence - name: verify test stop router idempotence
assert: assert:
that: that:
- not router|changed - router is not changed
- router.state == "Stopped" - router.state == "Stopped"
- router.service_offering == "System Offering For Software Router" - router.service_offering == "System Offering For Software Router"
@ -125,7 +125,7 @@
- name: verify test start router in check mode - name: verify test start router in check mode
assert: assert:
that: that:
- router|changed - router is changed
- router.state == "Stopped" - router.state == "Stopped"
- router.service_offering == "System Offering For Software Router" - router.service_offering == "System Offering For Software Router"
@ -138,7 +138,7 @@
- name: verify test start router - name: verify test start router
assert: assert:
that: that:
- router|changed - router is changed
- router.state == "Running" - router.state == "Running"
- router.service_offering == "System Offering For Software Router" - router.service_offering == "System Offering For Software Router"
@ -151,7 +151,7 @@
- name: verify test start router idempotence - name: verify test start router idempotence
assert: assert:
that: that:
- not router|changed - router is not changed
- router.state == "Running" - router.state == "Running"
- router.service_offering == "System Offering For Software Router" - router.service_offering == "System Offering For Software Router"
@ -165,7 +165,7 @@
- name: verify test restart router in check mode - name: verify test restart router in check mode
assert: assert:
that: that:
- router|changed - router is changed
- router.state == "Running" - router.state == "Running"
- router.service_offering == "System Offering For Software Router" - router.service_offering == "System Offering For Software Router"
@ -178,6 +178,6 @@
- name: verify test restart router - name: verify test restart router
assert: assert:
that: that:
- router|changed - router is changed
- router.state == "Running" - router.state == "Running"
- router.service_offering == "System Offering For Software Router" - router.service_offering == "System Offering For Software Router"

@ -5,7 +5,7 @@
- name: verify setup - name: verify setup
assert: assert:
that: that:
- sg|success - sg is successful
- name: test fail if missing name - name: test fail if missing name
action: cs_securitygroup action: cs_securitygroup
@ -14,7 +14,7 @@
- name: verify results of fail if missing name - name: verify results of fail if missing name
assert: assert:
that: that:
- sg|failed - sg is failed
- "sg.msg == 'missing required arguments: name'" - "sg.msg == 'missing required arguments: name'"
- name: test present security group in check mode - name: test present security group in check mode
@ -24,8 +24,8 @@
- name: verify results of create security group in check mode - name: verify results of create security group in check mode
assert: assert:
that: that:
- sg|success - sg is successful
- sg|changed - sg is changed
- name: test present security group - name: test present security group
cs_securitygroup: name={{ cs_resource_prefix }}_sg cs_securitygroup: name={{ cs_resource_prefix }}_sg
@ -33,8 +33,8 @@
- name: verify results of create security group - name: verify results of create security group
assert: assert:
that: that:
- sg|success - sg is successful
- sg|changed - sg is changed
- sg.name == "{{ cs_resource_prefix }}_sg" - sg.name == "{{ cs_resource_prefix }}_sg"
- name: test present security group is idempotence - name: test present security group is idempotence
@ -43,8 +43,8 @@
- name: verify results present security group is idempotence - name: verify results present security group is idempotence
assert: assert:
that: that:
- sg|success - sg is successful
- not sg|changed - sg is not changed
- sg.name == "{{ cs_resource_prefix }}_sg" - sg.name == "{{ cs_resource_prefix }}_sg"
- name: test absent security group in check mode - name: test absent security group in check mode
@ -54,8 +54,8 @@
- name: verify results of absent security group in check mode - name: verify results of absent security group in check mode
assert: assert:
that: that:
- sg|success - sg is successful
- sg|changed - sg is changed
- sg.name == "{{ cs_resource_prefix }}_sg" - sg.name == "{{ cs_resource_prefix }}_sg"
- name: test absent security group - name: test absent security group
@ -64,8 +64,8 @@
- name: verify results of absent security group - name: verify results of absent security group
assert: assert:
that: that:
- sg|success - sg is successful
- sg|changed - sg is changed
- sg.name == "{{ cs_resource_prefix }}_sg" - sg.name == "{{ cs_resource_prefix }}_sg"
- name: test absent security group is idempotence - name: test absent security group is idempotence
@ -74,6 +74,6 @@
- name: verify results of absent security group is idempotence - name: verify results of absent security group is idempotence
assert: assert:
that: that:
- sg|success - sg is successful
- not sg|changed - sg is not changed
- sg.name is undefined - sg.name is undefined

@ -11,8 +11,8 @@
- name: verify create http range rule in check mode - name: verify create http range rule in check mode
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- sg_rule|changed - sg_rule is changed
- sg_rule.type == 'ingress' - sg_rule.type == 'ingress'
- sg_rule.security_group == 'default' - sg_rule.security_group == 'default'
- sg_rule.protocol == 'tcp' - sg_rule.protocol == 'tcp'
@ -31,8 +31,8 @@
- name: verify create http range rule - name: verify create http range rule
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- sg_rule|changed - sg_rule is changed
- sg_rule.type == 'ingress' - sg_rule.type == 'ingress'
- sg_rule.security_group == 'default' - sg_rule.security_group == 'default'
- sg_rule.protocol == 'tcp' - sg_rule.protocol == 'tcp'
@ -51,8 +51,8 @@
- name: verify create http range rule idempotence - name: verify create http range rule idempotence
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- not sg_rule|changed - sg_rule is not changed
- name: test remove single port udp rule in check mode - name: test remove single port udp rule in check mode
cs_securitygroup_rule: cs_securitygroup_rule:
@ -67,8 +67,8 @@
- name: verify remove single port udp rule in check mode - name: verify remove single port udp rule in check mode
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- sg_rule|changed - sg_rule is changed
- sg_rule.type == 'egress' - sg_rule.type == 'egress'
- sg_rule.security_group == 'default' - sg_rule.security_group == 'default'
- sg_rule.protocol == 'udp' - sg_rule.protocol == 'udp'
@ -88,8 +88,8 @@
- name: verify remove single port udp rule - name: verify remove single port udp rule
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- sg_rule|changed - sg_rule is changed
- sg_rule.type == 'egress' - sg_rule.type == 'egress'
- sg_rule.security_group == 'default' - sg_rule.security_group == 'default'
- sg_rule.protocol == 'udp' - sg_rule.protocol == 'udp'
@ -109,8 +109,8 @@
- name: verify remove single port udp rule idempotence - name: verify remove single port udp rule idempotence
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- not sg_rule|changed - sg_rule is not changed
- name: test remove icmp rule in check mode - name: test remove icmp rule in check mode
cs_securitygroup_rule: cs_securitygroup_rule:
@ -125,8 +125,8 @@
- name: verify icmp rule in check mode - name: verify icmp rule in check mode
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- sg_rule|changed - sg_rule is changed
- sg_rule.type == 'ingress' - sg_rule.type == 'ingress'
- sg_rule.security_group == 'default' - sg_rule.security_group == 'default'
- sg_rule.cidr == '0.0.0.0/0' - sg_rule.cidr == '0.0.0.0/0'
@ -146,8 +146,8 @@
- name: verify icmp rule - name: verify icmp rule
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- sg_rule|changed - sg_rule is changed
- sg_rule.type == 'ingress' - sg_rule.type == 'ingress'
- sg_rule.security_group == 'default' - sg_rule.security_group == 'default'
- sg_rule.cidr == '0.0.0.0/0' - sg_rule.cidr == '0.0.0.0/0'
@ -167,5 +167,5 @@
- name: verify icmp rule idempotence - name: verify icmp rule idempotence
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- not sg_rule|changed - sg_rule is not changed

@ -4,4 +4,4 @@
- name: verify setup - name: verify setup
assert: assert:
that: that:
- sg|success - sg is successful

@ -10,8 +10,8 @@
- name: verify create http range rule in check mode - name: verify create http range rule in check mode
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- sg_rule|changed - sg_rule is changed
- name: test create http range rule - name: test create http range rule
cs_securitygroup_rule: cs_securitygroup_rule:
@ -23,8 +23,8 @@
- name: verify create http range rule - name: verify create http range rule
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- sg_rule|changed - sg_rule is changed
- sg_rule.type == 'ingress' - sg_rule.type == 'ingress'
- sg_rule.security_group == 'default' - sg_rule.security_group == 'default'
- sg_rule.protocol == 'tcp' - sg_rule.protocol == 'tcp'
@ -42,8 +42,8 @@
- name: verify create http range rule idempotence - name: verify create http range rule idempotence
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- not sg_rule|changed - sg_rule is not changed
- sg_rule.type == 'ingress' - sg_rule.type == 'ingress'
- sg_rule.security_group == 'default' - sg_rule.security_group == 'default'
- sg_rule.protocol == 'tcp' - sg_rule.protocol == 'tcp'
@ -63,8 +63,8 @@
- name: verify create single port udp rule in check mode - name: verify create single port udp rule in check mode
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- sg_rule|changed - sg_rule is changed
- name: test create single port udp rule - name: test create single port udp rule
cs_securitygroup_rule: cs_securitygroup_rule:
@ -77,8 +77,8 @@
- name: verify create single port udp rule - name: verify create single port udp rule
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- sg_rule|changed - sg_rule is changed
- sg_rule.type == 'egress' - sg_rule.type == 'egress'
- sg_rule.security_group == 'default' - sg_rule.security_group == 'default'
- sg_rule.protocol == 'udp' - sg_rule.protocol == 'udp'
@ -98,8 +98,8 @@
- name: verify single port udp rule idempotence - name: verify single port udp rule idempotence
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- not sg_rule|changed - sg_rule is not changed
- sg_rule.type == 'egress' - sg_rule.type == 'egress'
- sg_rule.security_group == 'default' - sg_rule.security_group == 'default'
- sg_rule.protocol == 'udp' - sg_rule.protocol == 'udp'
@ -119,8 +119,8 @@
- name: verify icmp rule in check mode - name: verify icmp rule in check mode
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- sg_rule|changed - sg_rule is changed
- name: test icmp rule - name: test icmp rule
cs_securitygroup_rule: cs_securitygroup_rule:
@ -133,8 +133,8 @@
- name: verify icmp rule - name: verify icmp rule
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- sg_rule|changed - sg_rule is changed
- sg_rule.type == 'ingress' - sg_rule.type == 'ingress'
- sg_rule.security_group == 'default' - sg_rule.security_group == 'default'
- sg_rule.cidr == '0.0.0.0/0' - sg_rule.cidr == '0.0.0.0/0'
@ -153,8 +153,8 @@
- name: verify icmp rule idempotence - name: verify icmp rule idempotence
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- not sg_rule|changed - sg_rule is not changed
- sg_rule.type == 'ingress' - sg_rule.type == 'ingress'
- sg_rule.security_group == 'default' - sg_rule.security_group == 'default'
- sg_rule.cidr == '0.0.0.0/0' - sg_rule.cidr == '0.0.0.0/0'

@ -4,7 +4,7 @@
- name: verify setup - name: verify setup
assert: assert:
that: that:
- sg|success - sg is successful
- name: setup default security group - name: setup default security group
cs_securitygroup: name=default cs_securitygroup: name=default
@ -12,7 +12,7 @@
- name: verify setup - name: verify setup
assert: assert:
that: that:
- sg|success - sg is successful
- name: setup remove icmp rule - name: setup remove icmp rule
cs_securitygroup_rule: cs_securitygroup_rule:
@ -26,7 +26,7 @@
- name: verify remove icmp rule - name: verify remove icmp rule
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- name: setup remove http range rule - name: setup remove http range rule
cs_securitygroup_rule: cs_securitygroup_rule:
@ -39,7 +39,7 @@
- name: verify remove http range rule - name: verify remove http range rule
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful
- name: setup remove single port udp rule - name: setup remove single port udp rule
cs_securitygroup_rule: cs_securitygroup_rule:
@ -53,4 +53,4 @@
- name: verify remove single port udp rule - name: verify remove single port udp rule
assert: assert:
that: that:
- sg_rule|success - sg_rule is successful

@ -7,7 +7,7 @@
- name: verify setup service offering - name: verify setup service offering
assert: assert:
that: that:
- so|success - so is successful
- name: create service offering in check mode - name: create service offering in check mode
cs_serviceoffer: cs_serviceoffer:
@ -26,7 +26,7 @@
- name: verify create service offering in check mode - name: verify create service offering in check mode
assert: assert:
that: that:
- so|changed - so is changed
- name: create service offering - name: create service offering
cs_serviceoffer: cs_serviceoffer:
@ -44,7 +44,7 @@
- name: verify create service offering - name: verify create service offering
assert: assert:
that: that:
- so|changed - so is changed
- so.name == "Micro" - so.name == "Micro"
- so.display_text == "Micro 512mb 1cpu" - so.display_text == "Micro 512mb 1cpu"
- so.cpu_number == 1 - so.cpu_number == 1
@ -70,7 +70,7 @@
- name: verify create service offering idempotence - name: verify create service offering idempotence
assert: assert:
that: that:
- not so|changed - so is not changed
- so.name == "Micro" - so.name == "Micro"
- so.display_text == "Micro 512mb 1cpu" - so.display_text == "Micro 512mb 1cpu"
- so.cpu_number == 1 - so.cpu_number == 1
@ -89,7 +89,7 @@
- name: verify create update offering in check mode - name: verify create update offering in check mode
assert: assert:
that: that:
- so|changed - so is changed
- so.name == "Micro" - so.name == "Micro"
- so.display_text == "Micro 512mb 1cpu" - so.display_text == "Micro 512mb 1cpu"
- so.cpu_number == 1 - so.cpu_number == 1
@ -107,7 +107,7 @@
- name: verify update service offerin - name: verify update service offerin
assert: assert:
that: that:
- so|changed - so is changed
- so.name == "Micro" - so.name == "Micro"
- so.display_text == "Micro RAM 512MB 1vCPU" - so.display_text == "Micro RAM 512MB 1vCPU"
- so.cpu_number == 1 - so.cpu_number == 1
@ -125,7 +125,7 @@
- name: verify update service offering idempotence - name: verify update service offering idempotence
assert: assert:
that: that:
- not so|changed - so is not changed
- so.name == "Micro" - so.name == "Micro"
- so.display_text == "Micro RAM 512MB 1vCPU" - so.display_text == "Micro RAM 512MB 1vCPU"
- so.cpu_number == 1 - so.cpu_number == 1
@ -144,7 +144,7 @@
- name: verify remove service offering in check mode - name: verify remove service offering in check mode
assert: assert:
that: that:
- so|changed - so is changed
- so.name == "Micro" - so.name == "Micro"
- so.display_text == "Micro RAM 512MB 1vCPU" - so.display_text == "Micro RAM 512MB 1vCPU"
- so.cpu_number == 1 - so.cpu_number == 1
@ -162,7 +162,7 @@
- name: verify remove service offering - name: verify remove service offering
assert: assert:
that: that:
- so|changed - so is changed
- so.name == "Micro" - so.name == "Micro"
- so.display_text == "Micro RAM 512MB 1vCPU" - so.display_text == "Micro RAM 512MB 1vCPU"
- so.cpu_number == 1 - so.cpu_number == 1
@ -180,4 +180,4 @@
- name: verify remove service offering idempotence - name: verify remove service offering idempotence
assert: assert:
that: that:
- not so|changed - so is not changed

@ -8,7 +8,7 @@
- name: verify setup system offering - name: verify setup system offering
assert: assert:
that: that:
- so|success - so is successful
- name: fail missing storage type and is_system - name: fail missing storage type and is_system
cs_serviceoffer: cs_serviceoffer:
@ -27,7 +27,7 @@
- name: verify create system service offering in check mode - name: verify create system service offering in check mode
assert: assert:
that: that:
- so|failed - so is failed
- so.msg.startswith('missing required arguments:') - so.msg.startswith('missing required arguments:')
- name: create system service offering in check mode - name: create system service offering in check mode
@ -48,7 +48,7 @@
- name: verify create system service offering in check mode - name: verify create system service offering in check mode
assert: assert:
that: that:
- so|changed - so is changed
- name: create system service offering - name: create system service offering
cs_serviceoffer: cs_serviceoffer:
@ -67,7 +67,7 @@
- name: verify create system service offering - name: verify create system service offering
assert: assert:
that: that:
- so|changed - so is changed
- so.name == "System Offering for Ansible" - so.name == "System Offering for Ansible"
- so.display_text == "System Offering for Ansible" - so.display_text == "System Offering for Ansible"
- so.cpu_number == 1 - so.cpu_number == 1
@ -98,7 +98,7 @@
- name: verify create system service offering idempotence - name: verify create system service offering idempotence
assert: assert:
that: that:
- not so|changed - so is not changed
- so.name == "System Offering for Ansible" - so.name == "System Offering for Ansible"
- so.display_text == "System Offering for Ansible" - so.display_text == "System Offering for Ansible"
- so.cpu_number == 1 - so.cpu_number == 1
@ -122,7 +122,7 @@
- name: verify remove system service offering in check mode - name: verify remove system service offering in check mode
assert: assert:
that: that:
- so|changed - so is changed
- so.name == "System Offering for Ansible" - so.name == "System Offering for Ansible"
- so.is_system == true - so.is_system == true
@ -135,7 +135,7 @@
- name: verify remove system service offering - name: verify remove system service offering
assert: assert:
that: that:
- so|changed - so is changed
- so.name == "System Offering for Ansible" - so.name == "System Offering for Ansible"
- so.is_system == true - so.is_system == true
@ -148,4 +148,4 @@
- name: verify remove system service offering idempotence - name: verify remove system service offering idempotence
assert: assert:
that: that:
- not so|changed - so is not changed

@ -9,7 +9,7 @@
- name: verify setup instance - name: verify setup instance
assert: assert:
that: that:
- instance|success - instance is successful
- name: setup snapshot policy absent - name: setup snapshot policy absent
cs_snapshot_policy: cs_snapshot_policy:
@ -20,7 +20,7 @@
- name: verify setup snapshot policy absent - name: verify setup snapshot policy absent
assert: assert:
that: that:
- snapshot|success - snapshot is successful
- name: create snapshot policy in check mode - name: create snapshot policy in check mode
cs_snapshot_policy: cs_snapshot_policy:
@ -32,7 +32,7 @@
- name: verify create snapshot policy in check mode - name: verify create snapshot policy in check mode
assert: assert:
that: that:
- snapshot|changed - snapshot is changed
- name: create snapshot policy - name: create snapshot policy
cs_snapshot_policy: cs_snapshot_policy:
@ -43,7 +43,7 @@
- name: verify create snapshot policy - name: verify create snapshot policy
assert: assert:
that: that:
- snapshot|changed - snapshot is changed
- snapshot.schedule == "5" - snapshot.schedule == "5"
- snapshot.interval_type == "hourly" - snapshot.interval_type == "hourly"
- snapshot.volume != "" - snapshot.volume != ""
@ -57,7 +57,7 @@
- name: verify create snapshot policy idempotence - name: verify create snapshot policy idempotence
assert: assert:
that: that:
- not snapshot|changed - snapshot is not changed
- snapshot.schedule == "5" - snapshot.schedule == "5"
- snapshot.interval_type == "hourly" - snapshot.interval_type == "hourly"
- snapshot.volume != "" - snapshot.volume != ""
@ -72,7 +72,7 @@
- name: verify update snapshot policy - name: verify update snapshot policy
assert: assert:
that: that:
- snapshot|changed - snapshot is changed
- snapshot.schedule == "5" - snapshot.schedule == "5"
- snapshot.interval_type == "hourly" - snapshot.interval_type == "hourly"
- snapshot.volume != "" - snapshot.volume != ""
@ -89,7 +89,7 @@
- name: verify update snapshot policy in check mode - name: verify update snapshot policy in check mode
assert: assert:
that: that:
- snapshot|changed - snapshot is changed
- snapshot.schedule == "5" - snapshot.schedule == "5"
- snapshot.interval_type == "hourly" - snapshot.interval_type == "hourly"
- snapshot.volume != "" - snapshot.volume != ""
@ -107,7 +107,7 @@
- name: verify update snapshot policy - name: verify update snapshot policy
assert: assert:
that: that:
- snapshot|changed - snapshot is changed
- snapshot.schedule == "6" - snapshot.schedule == "6"
- snapshot.interval_type == "hourly" - snapshot.interval_type == "hourly"
- snapshot.volume != "" - snapshot.volume != ""
@ -125,7 +125,7 @@
- name: verify update snapshot policy idempotence - name: verify update snapshot policy idempotence
assert: assert:
that: that:
- not snapshot|changed - snapshot is not changed
- snapshot.schedule == "6" - snapshot.schedule == "6"
- snapshot.interval_type == "hourly" - snapshot.interval_type == "hourly"
- snapshot.volume != "" - snapshot.volume != ""
@ -142,7 +142,7 @@
- name: verify remove snapshot policy in check mode - name: verify remove snapshot policy in check mode
assert: assert:
that: that:
- snapshot|changed - snapshot is changed
- snapshot.schedule == "6" - snapshot.schedule == "6"
- snapshot.interval_type == "hourly" - snapshot.interval_type == "hourly"
- snapshot.volume != "" - snapshot.volume != ""
@ -158,7 +158,7 @@
- name: verify remove snapshot policy - name: verify remove snapshot policy
assert: assert:
that: that:
- snapshot|changed - snapshot is changed
- snapshot.schedule == "6" - snapshot.schedule == "6"
- snapshot.interval_type == "hourly" - snapshot.interval_type == "hourly"
- snapshot.volume != "" - snapshot.volume != ""
@ -174,4 +174,4 @@
- name: verify remove snapshot policy idempotence - name: verify remove snapshot policy idempotence
assert: assert:
that: that:
- not snapshot|changed - snapshot is not changed

@ -12,7 +12,7 @@
- name: verify results of fail on missing name - name: verify results of fail on missing name
assert: assert:
that: that:
- sshkey|failed - sshkey is failed
- "sshkey.msg == 'missing required arguments: name'" - "sshkey.msg == 'missing required arguments: name'"
- name: test ssh key creation in check mode - name: test ssh key creation in check mode
@ -23,8 +23,8 @@
- name: verify results of ssh key creation in check mode - name: verify results of ssh key creation in check mode
assert: assert:
that: that:
- sshkey|success - sshkey is successful
- sshkey|changed - sshkey is changed
- name: test ssh key creation - name: test ssh key creation
cs_sshkeypair: cs_sshkeypair:
@ -33,8 +33,8 @@
- name: verify results of ssh key creation - name: verify results of ssh key creation
assert: assert:
that: that:
- sshkey|success - sshkey is successful
- sshkey|changed - sshkey is changed
- sshkey.fingerprint is defined and sshkey.fingerprint != "" - sshkey.fingerprint is defined and sshkey.fingerprint != ""
- sshkey.private_key is defined and sshkey.private_key != "" - sshkey.private_key is defined and sshkey.private_key != ""
- sshkey.name == "first-sshkey" - sshkey.name == "first-sshkey"
@ -46,8 +46,8 @@
- name: verify results of ssh key creation idempotence - name: verify results of ssh key creation idempotence
assert: assert:
that: that:
- sshkey2|success - sshkey2 is successful
- not sshkey2|changed - sshkey2 is not changed
- sshkey2.fingerprint is defined and sshkey2.fingerprint == sshkey.fingerprint - sshkey2.fingerprint is defined and sshkey2.fingerprint == sshkey.fingerprint
- sshkey2.private_key is not defined - sshkey2.private_key is not defined
- sshkey2.name == "first-sshkey" - sshkey2.name == "first-sshkey"
@ -61,8 +61,8 @@
- name: verify results of replace ssh public key in check mode - name: verify results of replace ssh public key in check mode
assert: assert:
that: that:
- sshkey2|success - sshkey2 is successful
- sshkey2|changed - sshkey2 is changed
- sshkey2.fingerprint is defined and sshkey2.fingerprint == sshkey.fingerprint - sshkey2.fingerprint is defined and sshkey2.fingerprint == sshkey.fingerprint
- sshkey2.private_key is not defined - sshkey2.private_key is not defined
- sshkey2.name == "first-sshkey" - sshkey2.name == "first-sshkey"
@ -75,8 +75,8 @@
- name: verify results of replace ssh public key - name: verify results of replace ssh public key
assert: assert:
that: that:
- sshkey3|success - sshkey3 is successful
- sshkey3|changed - sshkey3 is changed
- sshkey3.fingerprint is defined and sshkey3.fingerprint != sshkey2.fingerprint - sshkey3.fingerprint is defined and sshkey3.fingerprint != sshkey2.fingerprint
- sshkey3.private_key is not defined - sshkey3.private_key is not defined
- sshkey3.name == "first-sshkey" - sshkey3.name == "first-sshkey"
@ -89,8 +89,8 @@
- name: verify results of ssh public key idempotence - name: verify results of ssh public key idempotence
assert: assert:
that: that:
- sshkey4|success - sshkey4 is successful
- not sshkey4|changed - sshkey4 is not changed
- sshkey4.fingerprint is defined and sshkey4.fingerprint == sshkey3.fingerprint - sshkey4.fingerprint is defined and sshkey4.fingerprint == sshkey3.fingerprint
- sshkey4.private_key is not defined - sshkey4.private_key is not defined
- sshkey4.name == "first-sshkey" - sshkey4.name == "first-sshkey"
@ -107,8 +107,8 @@
- name: verify test different but exisitng name but same ssh public key as first-sshkey - name: verify test different but exisitng name but same ssh public key as first-sshkey
assert: assert:
that: that:
- sshkey|success - sshkey is successful
- sshkey|changed - sshkey is changed
- sshkey.fingerprint is defined and sshkey.fingerprint == sshkey4.fingerprint - sshkey.fingerprint is defined and sshkey.fingerprint == sshkey4.fingerprint
- sshkey.private_key is not defined - sshkey.private_key is not defined
- sshkey.name == "second-sshkey" - sshkey.name == "second-sshkey"
@ -120,8 +120,8 @@
- name: verify result of key absent in check mode - name: verify result of key absent in check mode
assert: assert:
that: that:
- sshkey5|success - sshkey5 is successful
- sshkey5|changed - sshkey5 is changed
- sshkey5.fingerprint is defined and sshkey5.fingerprint == sshkey3.fingerprint - sshkey5.fingerprint is defined and sshkey5.fingerprint == sshkey3.fingerprint
- sshkey5.private_key is not defined - sshkey5.private_key is not defined
- sshkey5.name == "second-sshkey" - sshkey5.name == "second-sshkey"
@ -132,8 +132,8 @@
- name: verify result of key absent - name: verify result of key absent
assert: assert:
that: that:
- sshkey5|success - sshkey5 is successful
- sshkey5|changed - sshkey5 is changed
- sshkey5.fingerprint is defined and sshkey5.fingerprint == sshkey3.fingerprint - sshkey5.fingerprint is defined and sshkey5.fingerprint == sshkey3.fingerprint
- sshkey5.private_key is not defined - sshkey5.private_key is not defined
- sshkey5.name == "second-sshkey" - sshkey5.name == "second-sshkey"
@ -144,8 +144,8 @@
- name: verify result of ssh key absent idempotence - name: verify result of ssh key absent idempotence
assert: assert:
that: that:
- sshkey6|success - sshkey6 is successful
- not sshkey6|changed - sshkey6 is not changed
- sshkey6.fingerprint is not defined - sshkey6.fingerprint is not defined
- sshkey6.private_key is not defined - sshkey6.private_key is not defined
- sshkey6.name is not defined - sshkey6.name is not defined

@ -14,7 +14,7 @@
- name: verify setup host is present - name: verify setup host is present
assert: assert:
that: that:
- host|success - host is successful
- name: setup storage pool is absent - name: setup storage pool is absent
cs_storage_pool: cs_storage_pool:
@ -25,7 +25,7 @@
- name: verify setup storage pool is absent - name: verify setup storage pool is absent
assert: assert:
that: that:
- sp|success - sp is successful
- name: test fail if missing params - name: test fail if missing params
cs_storage_pool: cs_storage_pool:
@ -34,7 +34,7 @@
- name: verify results of fail if missing params - name: verify results of fail if missing params
assert: assert:
that: that:
- sp|failed - sp is failed
- "sp.msg == 'missing required arguments: name'" - "sp.msg == 'missing required arguments: name'"
- name: test fail if provider unknown - name: test fail if provider unknown
@ -51,7 +51,7 @@
- name: verify test fail if provider unknown - name: verify test fail if provider unknown
assert: assert:
that: that:
- sp|failed - sp is failed
- "sp.msg == 'Storage provider DNE not found'" - "sp.msg == 'Storage provider DNE not found'"
- name: test fail if cluster unknown - name: test fail if cluster unknown
@ -67,7 +67,7 @@
- name: verify test fail if cluster unknown - name: verify test fail if cluster unknown
assert: assert:
that: that:
- sp|failed - sp is failed
- "sp.msg == 'Cluster DNE not found'" - "sp.msg == 'Cluster DNE not found'"
- name: test fail if pod unknown - name: test fail if pod unknown
@ -83,7 +83,7 @@
- name: verify test fail if pod unknown - name: verify test fail if pod unknown
assert: assert:
that: that:
- sp|failed - sp is failed
- "sp.msg == 'Pod DNE not found'" - "sp.msg == 'Pod DNE not found'"
- name: create storage pool in check mode - name: create storage pool in check mode
@ -99,8 +99,8 @@
- name: verify create storage pool in check mode - name: verify create storage pool in check mode
assert: assert:
that: that:
- sp|success - sp is successful
- sp|changed - sp is changed
- name: create storage pool - name: create storage pool
cs_storage_pool: cs_storage_pool:
@ -114,8 +114,8 @@
- name: verify create storage pool - name: verify create storage pool
assert: assert:
that: that:
- sp|success - sp is successful
- sp|changed - sp is changed
- sp.cluster == "C0-adv" - sp.cluster == "C0-adv"
- sp.pod == "POD0-adv" - sp.pod == "POD0-adv"
- sp.storage_url == "RBD://ceph-mons.domain/poolname" - sp.storage_url == "RBD://ceph-mons.domain/poolname"
@ -131,8 +131,8 @@
- name: verify create storage pool idempotence - name: verify create storage pool idempotence
assert: assert:
that: that:
- sp|success - sp is successful
- not sp|changed - sp is not changed
- sp.cluster == "C0-adv" - sp.cluster == "C0-adv"
- sp.pod == "POD0-adv" - sp.pod == "POD0-adv"
- sp.storage_url == "RBD://ceph-mons.domain/poolname" - sp.storage_url == "RBD://ceph-mons.domain/poolname"
@ -150,8 +150,8 @@
- name: verify disable storage pool in check mode - name: verify disable storage pool in check mode
assert: assert:
that: that:
- sp|success - sp is successful
- sp|changed - sp is changed
- sp.allocation_state == 'enabled' - sp.allocation_state == 'enabled'
- sp.cluster == "C0-adv" - sp.cluster == "C0-adv"
- sp.pod == "POD0-adv" - sp.pod == "POD0-adv"
@ -170,8 +170,8 @@
- name: verify disable storage pool - name: verify disable storage pool
assert: assert:
that: that:
- sp|success - sp is successful
- sp|changed - sp is changed
- sp.allocation_state == 'disabled' - sp.allocation_state == 'disabled'
- sp.cluster == "C0-adv" - sp.cluster == "C0-adv"
- sp.pod == "POD0-adv" - sp.pod == "POD0-adv"
@ -190,8 +190,8 @@
- name: verify disable storage pool idempotence - name: verify disable storage pool idempotence
assert: assert:
that: that:
- sp|success - sp is successful
- not sp|changed - sp is not changed
- sp.allocation_state == 'disabled' - sp.allocation_state == 'disabled'
- sp.cluster == "C0-adv" - sp.cluster == "C0-adv"
- sp.pod == "POD0-adv" - sp.pod == "POD0-adv"
@ -213,8 +213,8 @@
- name: verify update while storage pool disabled in check mode - name: verify update while storage pool disabled in check mode
assert: assert:
that: that:
- sp|success - sp is successful
- sp|changed - sp is changed
- sp.allocation_state == 'disabled' - sp.allocation_state == 'disabled'
- sp.storage_tags == [] - sp.storage_tags == []
- sp.cluster == "C0-adv" - sp.cluster == "C0-adv"
@ -236,8 +236,8 @@
- name: verify update while storage pool disabled - name: verify update while storage pool disabled
assert: assert:
that: that:
- sp|success - sp is successful
- sp|changed - sp is changed
- sp.allocation_state == 'disabled' - sp.allocation_state == 'disabled'
- sp.storage_tags == ['eco', 'ssd'] - sp.storage_tags == ['eco', 'ssd']
- sp.cluster == "C0-adv" - sp.cluster == "C0-adv"
@ -259,8 +259,8 @@
- name: verify update while storage pool disabled idempotence - name: verify update while storage pool disabled idempotence
assert: assert:
that: that:
- sp|success - sp is successful
- not sp|changed - sp is not changed
- sp.allocation_state == 'disabled' - sp.allocation_state == 'disabled'
- sp.storage_tags == ['eco', 'ssd'] - sp.storage_tags == ['eco', 'ssd']
- sp.cluster == "C0-adv" - sp.cluster == "C0-adv"
@ -281,8 +281,8 @@
- name: verify put storage in maintenance pool in check mode - name: verify put storage in maintenance pool in check mode
assert: assert:
that: that:
- sp|success - sp is successful
- sp|changed - sp is changed
- sp.allocation_state == 'disabled' - sp.allocation_state == 'disabled'
- sp.cluster == "C0-adv" - sp.cluster == "C0-adv"
- sp.pod == "POD0-adv" - sp.pod == "POD0-adv"
@ -301,8 +301,8 @@
- name: verify put storage in maintenance pool - name: verify put storage in maintenance pool
assert: assert:
that: that:
- sp|success - sp is successful
- sp|changed - sp is changed
- sp.allocation_state == 'maintenance' - sp.allocation_state == 'maintenance'
- sp.cluster == "C0-adv" - sp.cluster == "C0-adv"
- sp.pod == "POD0-adv" - sp.pod == "POD0-adv"
@ -321,8 +321,8 @@
- name: verify put storage in maintenance pool idempotence - name: verify put storage in maintenance pool idempotence
assert: assert:
that: that:
- sp|success - sp is successful
- not sp|changed - sp is not changed
- sp.allocation_state == 'maintenance' - sp.allocation_state == 'maintenance'
- sp.cluster == "C0-adv" - sp.cluster == "C0-adv"
- sp.pod == "POD0-adv" - sp.pod == "POD0-adv"
@ -341,8 +341,8 @@
- name: verify update while in maintenance pool - name: verify update while in maintenance pool
assert: assert:
that: that:
- sp|success - sp is successful
- sp|changed - sp is changed
- sp.allocation_state == 'maintenance' - sp.allocation_state == 'maintenance'
- sp.cluster == "C0-adv" - sp.cluster == "C0-adv"
- sp.pod == "POD0-adv" - sp.pod == "POD0-adv"
@ -359,8 +359,8 @@
- name: verify remove storage pool in check mode - name: verify remove storage pool in check mode
assert: assert:
that: that:
- sp|success - sp is successful
- sp|changed - sp is changed
- sp.cluster == "C0-adv" - sp.cluster == "C0-adv"
- sp.pod == "POD0-adv" - sp.pod == "POD0-adv"
- sp.storage_url == "RBD://ceph-mons.domain/poolname" - sp.storage_url == "RBD://ceph-mons.domain/poolname"
@ -374,8 +374,8 @@
- name: verify remove storage pool - name: verify remove storage pool
assert: assert:
that: that:
- sp|success - sp is successful
- sp|changed - sp is changed
- sp.cluster == "C0-adv" - sp.cluster == "C0-adv"
- sp.pod == "POD0-adv" - sp.pod == "POD0-adv"
- sp.storage_url == "RBD://ceph-mons.domain/poolname" - sp.storage_url == "RBD://ceph-mons.domain/poolname"
@ -389,8 +389,8 @@
- name: verify remove storage pool idempotence - name: verify remove storage pool idempotence
assert: assert:
that: that:
- sp|success - sp is successful
- not sp|changed - sp is not changed
- name: create storage pool in maintenance - name: create storage pool in maintenance
cs_storage_pool: cs_storage_pool:
@ -405,8 +405,8 @@
- name: verify create storage pool in maintenance - name: verify create storage pool in maintenance
assert: assert:
that: that:
- sp|success - sp is successful
- sp|changed - sp is changed
- sp.allocation_state == 'maintenance' - sp.allocation_state == 'maintenance'
- sp.cluster == "C0-adv" - sp.cluster == "C0-adv"
- sp.pod == "POD0-adv" - sp.pod == "POD0-adv"
@ -421,8 +421,8 @@
- name: verify storage pool in maintenance - name: verify storage pool in maintenance
assert: assert:
that: that:
- sp|success - sp is successful
- sp|changed - sp is changed
- sp.allocation_state == 'maintenance' - sp.allocation_state == 'maintenance'
- sp.cluster == "C0-adv" - sp.cluster == "C0-adv"
- sp.pod == "POD0-adv" - sp.pod == "POD0-adv"
@ -441,8 +441,8 @@
- name: verify create storage pool in disabled - name: verify create storage pool in disabled
assert: assert:
that: that:
- sp|success - sp is successful
- sp|changed - sp is changed
- sp.allocation_state == 'disabled' - sp.allocation_state == 'disabled'
- sp.cluster == "C0-adv" - sp.cluster == "C0-adv"
- sp.pod == "POD0-adv" - sp.pod == "POD0-adv"
@ -457,8 +457,8 @@
- name: verify remove disabled storage pool - name: verify remove disabled storage pool
assert: assert:
that: that:
- sp|success - sp is successful
- sp|changed - sp is changed
- sp.allocation_state == 'disabled' - sp.allocation_state == 'disabled'
- sp.cluster == "C0-adv" - sp.cluster == "C0-adv"
- sp.pod == "POD0-adv" - sp.pod == "POD0-adv"

@ -5,7 +5,7 @@
- name: verify setup - name: verify setup
assert: assert:
that: that:
- user|success - user is successful
- name: test fail if missing username - name: test fail if missing username
action: cs_user action: cs_user
@ -14,7 +14,7 @@
- name: verify results of fail if missing params - name: verify results of fail if missing params
assert: assert:
that: that:
- user|failed - user is failed
- 'user.msg == "missing required arguments: username"' - 'user.msg == "missing required arguments: username"'
- name: test fail if missing params if state=present - name: test fail if missing params if state=present
@ -25,7 +25,7 @@
- name: verify results of fail if missing params if state=present - name: verify results of fail if missing params if state=present
assert: assert:
that: that:
- user|failed - user is failed
- 'user.msg == "missing required arguments: account, email, password, first_name, last_name"' - 'user.msg == "missing required arguments: account, email, password, first_name, last_name"'
- name: test create user in check mode - name: test create user in check mode
@ -41,8 +41,8 @@
- name: verify results of create user in check mode - name: verify results of create user in check mode
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- name: test create user - name: test create user
cs_user: cs_user:
@ -56,8 +56,8 @@
- name: verify results of create user - name: verify results of create user
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.first_name == "{{ cs_resource_prefix }}_first_name" - user.first_name == "{{ cs_resource_prefix }}_first_name"
- user.last_name == "{{ cs_resource_prefix }}_last_name" - user.last_name == "{{ cs_resource_prefix }}_last_name"
@ -80,8 +80,8 @@
- name: verify results of create user idempotence - name: verify results of create user idempotence
assert: assert:
that: that:
- user|success - user is successful
- not user|changed - user is not changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.first_name == "{{ cs_resource_prefix }}_first_name" - user.first_name == "{{ cs_resource_prefix }}_first_name"
- user.last_name == "{{ cs_resource_prefix }}_last_name" - user.last_name == "{{ cs_resource_prefix }}_last_name"
@ -105,14 +105,14 @@
- name: verify results of create account - name: verify results of create account
assert: assert:
that: that:
- acc|success - acc is successful
- acc|changed - acc is changed
- acc.name == "{{ cs_resource_prefix }}_acc" - acc.name == "{{ cs_resource_prefix }}_acc"
- acc.network_domain == "example.com" - acc.network_domain == "example.com"
- acc.account_type == "user" - acc.account_type == "user"
- acc.state == "enabled" - acc.state == "enabled"
- acc.domain == "ROOT" - acc.domain == "ROOT"
- acc|changed - acc is changed
- name: test create user2 in check mode - name: test create user2 in check mode
cs_user: cs_user:
@ -128,8 +128,8 @@
- name: verify results of create user idempotence - name: verify results of create user idempotence
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- name: test create user2 - name: test create user2
cs_user: cs_user:
@ -144,8 +144,8 @@
- name: verify results of create user idempotence - name: verify results of create user idempotence
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user2" - user.username == "{{ cs_resource_prefix }}_user2"
- user.first_name == "{{ cs_resource_prefix }}_first_name2" - user.first_name == "{{ cs_resource_prefix }}_first_name2"
- user.last_name == "{{ cs_resource_prefix }}_last_name2" - user.last_name == "{{ cs_resource_prefix }}_last_name2"
@ -169,8 +169,8 @@
- name: verify results of create user idempotence - name: verify results of create user idempotence
assert: assert:
that: that:
- user|success - user is successful
- not user|changed - user is not changed
- user.username == "{{ cs_resource_prefix }}_user2" - user.username == "{{ cs_resource_prefix }}_user2"
- user.first_name == "{{ cs_resource_prefix }}_first_name2" - user.first_name == "{{ cs_resource_prefix }}_first_name2"
- user.last_name == "{{ cs_resource_prefix }}_last_name2" - user.last_name == "{{ cs_resource_prefix }}_last_name2"
@ -195,8 +195,8 @@
- name: verify results of update user in check mode - name: verify results of update user in check mode
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.first_name == "{{ cs_resource_prefix }}_first_name" - user.first_name == "{{ cs_resource_prefix }}_first_name"
- user.last_name == "{{ cs_resource_prefix }}_last_name" - user.last_name == "{{ cs_resource_prefix }}_last_name"
@ -220,8 +220,8 @@
- name: verify results of update user - name: verify results of update user
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.first_name == "{{ cs_resource_prefix }}_first_name1" - user.first_name == "{{ cs_resource_prefix }}_first_name1"
- user.last_name == "{{ cs_resource_prefix }}_last_name1" - user.last_name == "{{ cs_resource_prefix }}_last_name1"
@ -245,8 +245,8 @@
- name: verify results of update user idempotence - name: verify results of update user idempotence
assert: assert:
that: that:
- user|success - user is successful
- not user|changed - user is not changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.first_name == "{{ cs_resource_prefix }}_first_name1" - user.first_name == "{{ cs_resource_prefix }}_first_name1"
- user.last_name == "{{ cs_resource_prefix }}_last_name1" - user.last_name == "{{ cs_resource_prefix }}_last_name1"
@ -266,8 +266,8 @@
- name: verify results of lock user in check mode - name: verify results of lock user in check mode
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.account_type == "root_admin" - user.account_type == "root_admin"
- user.account == "admin" - user.account == "admin"
@ -282,8 +282,8 @@
- name: verify results of lock user - name: verify results of lock user
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.account_type == "root_admin" - user.account_type == "root_admin"
- user.account == "admin" - user.account == "admin"
@ -298,8 +298,8 @@
- name: verify results of lock user idempotence - name: verify results of lock user idempotence
assert: assert:
that: that:
- user|success - user is successful
- not user|changed - user is not changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.account_type == "root_admin" - user.account_type == "root_admin"
- user.account == "admin" - user.account == "admin"
@ -315,8 +315,8 @@
- name: verify results of disable user in check mode - name: verify results of disable user in check mode
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.account_type == "root_admin" - user.account_type == "root_admin"
- user.account == "admin" - user.account == "admin"
@ -331,8 +331,8 @@
- name: verify results of disable user - name: verify results of disable user
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.account_type == "root_admin" - user.account_type == "root_admin"
- user.account == "admin" - user.account == "admin"
@ -347,8 +347,8 @@
- name: verify results of disable user idempotence - name: verify results of disable user idempotence
assert: assert:
that: that:
- user|success - user is successful
- not user|changed - user is not changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.account_type == "root_admin" - user.account_type == "root_admin"
- user.account == "admin" - user.account == "admin"
@ -364,8 +364,8 @@
- name: verify results of lock disabled user in check mode - name: verify results of lock disabled user in check mode
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.account_type == "root_admin" - user.account_type == "root_admin"
- user.account == "admin" - user.account == "admin"
@ -380,8 +380,8 @@
- name: verify results of lock disabled user - name: verify results of lock disabled user
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.account_type == "root_admin" - user.account_type == "root_admin"
- user.account == "admin" - user.account == "admin"
@ -396,8 +396,8 @@
- name: verify results of lock disabled user idempotence - name: verify results of lock disabled user idempotence
assert: assert:
that: that:
- user|success - user is successful
- not user|changed - user is not changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.account_type == "root_admin" - user.account_type == "root_admin"
- user.account == "admin" - user.account == "admin"
@ -413,8 +413,8 @@
- name: verify results of enable user in check mode - name: verify results of enable user in check mode
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.account_type == "root_admin" - user.account_type == "root_admin"
- user.account == "admin" - user.account == "admin"
@ -429,8 +429,8 @@
- name: verify results of enable user - name: verify results of enable user
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.account_type == "root_admin" - user.account_type == "root_admin"
- user.account == "admin" - user.account == "admin"
@ -445,8 +445,8 @@
- name: verify results of enable user idempotence - name: verify results of enable user idempotence
assert: assert:
that: that:
- user|success - user is successful
- not user|changed - user is not changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.account_type == "root_admin" - user.account_type == "root_admin"
- user.account == "admin" - user.account == "admin"
@ -462,8 +462,8 @@
- name: verify results of remove user in check mode - name: verify results of remove user in check mode
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.account_type == "root_admin" - user.account_type == "root_admin"
- user.account == "admin" - user.account == "admin"
@ -478,8 +478,8 @@
- name: verify results of remove user - name: verify results of remove user
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.account_type == "root_admin" - user.account_type == "root_admin"
- user.account == "admin" - user.account == "admin"
@ -494,8 +494,8 @@
- name: verify results of remove user idempotence - name: verify results of remove user idempotence
assert: assert:
that: that:
- user|success - user is successful
- not user|changed - user is not changed
- name: test create locked user - name: test create locked user
cs_user: cs_user:
@ -510,8 +510,8 @@
- name: verify results of create locked user - name: verify results of create locked user
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.first_name == "{{ cs_resource_prefix }}_first_name" - user.first_name == "{{ cs_resource_prefix }}_first_name"
- user.last_name == "{{ cs_resource_prefix }}_last_name" - user.last_name == "{{ cs_resource_prefix }}_last_name"
@ -529,8 +529,8 @@
- name: verify results of remove locked user - name: verify results of remove locked user
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.account_type == "root_admin" - user.account_type == "root_admin"
- user.account == "admin" - user.account == "admin"
@ -550,8 +550,8 @@
- name: verify results of create disabled user - name: verify results of create disabled user
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.first_name == "{{ cs_resource_prefix }}_first_name" - user.first_name == "{{ cs_resource_prefix }}_first_name"
- user.last_name == "{{ cs_resource_prefix }}_last_name" - user.last_name == "{{ cs_resource_prefix }}_last_name"
@ -569,8 +569,8 @@
- name: verify results of remove disabled user - name: verify results of remove disabled user
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.account_type == "root_admin" - user.account_type == "root_admin"
- user.account == "admin" - user.account == "admin"
@ -590,8 +590,8 @@
- name: verify results of create enabled user - name: verify results of create enabled user
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.first_name == "{{ cs_resource_prefix }}_first_name" - user.first_name == "{{ cs_resource_prefix }}_first_name"
- user.last_name == "{{ cs_resource_prefix }}_last_name" - user.last_name == "{{ cs_resource_prefix }}_last_name"
@ -609,8 +609,8 @@
- name: verify results of remove enabled user - name: verify results of remove enabled user
assert: assert:
that: that:
- user|success - user is successful
- user|changed - user is changed
- user.username == "{{ cs_resource_prefix }}_user" - user.username == "{{ cs_resource_prefix }}_user"
- user.account_type == "root_admin" - user.account_type == "root_admin"
- user.account == "admin" - user.account == "admin"

@ -8,7 +8,7 @@
- name: verify create instance - name: verify create instance
assert: assert:
that: that:
- instance|success - instance is successful
- name: ensure no snapshot exists - name: ensure no snapshot exists
cs_vmsnapshot: cs_vmsnapshot:
@ -19,7 +19,7 @@
- name: verify setup - name: verify setup
assert: assert:
that: that:
- snap|success - snap is successful
- name: test fail if missing name - name: test fail if missing name
action: cs_vmsnapshot action: cs_vmsnapshot
@ -28,7 +28,7 @@
- name: verify results of fail if missing params - name: verify results of fail if missing params
assert: assert:
that: that:
- snap|failed - snap is failed
- 'snap.msg.startswith("missing required arguments: ")' - 'snap.msg.startswith("missing required arguments: ")'
- name: test create snapshot in check mode - name: test create snapshot in check mode
@ -41,7 +41,7 @@
- name: verify test create snapshot in check mode - name: verify test create snapshot in check mode
assert: assert:
that: that:
- snap|changed - snap is changed
- name: test create snapshot - name: test create snapshot
cs_vmsnapshot: cs_vmsnapshot:
@ -52,7 +52,7 @@
- name: verify test create snapshot - name: verify test create snapshot
assert: assert:
that: that:
- snap|changed - snap is changed
- snap.display_name == "{{ cs_resource_prefix }}_snapshot" - snap.display_name == "{{ cs_resource_prefix }}_snapshot"
- name: test create snapshot idempotence - name: test create snapshot idempotence
@ -64,7 +64,7 @@
- name: verify test create snapshot idempotence - name: verify test create snapshot idempotence
assert: assert:
that: that:
- not snap|changed - snap is not changed
- snap.display_name == "{{ cs_resource_prefix }}_snapshot" - snap.display_name == "{{ cs_resource_prefix }}_snapshot"
- name: test revert snapshot in check mode - name: test revert snapshot in check mode
@ -77,7 +77,7 @@
- name: verify test revert snapshot in check mode - name: verify test revert snapshot in check mode
assert: assert:
that: that:
- snap|changed - snap is changed
- snap.display_name == "{{ cs_resource_prefix }}_snapshot" - snap.display_name == "{{ cs_resource_prefix }}_snapshot"
- name: test fail revert unknown snapshot - name: test fail revert unknown snapshot
@ -90,7 +90,7 @@
- name: verify test fail revert unknown snapshot - name: verify test fail revert unknown snapshot
assert: assert:
that: that:
- snap|failed - snap is failed
- snap.msg == "snapshot not found, could not revert VM" - snap.msg == "snapshot not found, could not revert VM"
- name: test revert snapshot - name: test revert snapshot
@ -102,7 +102,7 @@
- name: verify test revert snapshot - name: verify test revert snapshot
assert: assert:
that: that:
- snap|changed - snap is changed
- snap.display_name == "{{ cs_resource_prefix }}_snapshot" - snap.display_name == "{{ cs_resource_prefix }}_snapshot"
- name: test remove snapshot in check mode - name: test remove snapshot in check mode
@ -115,7 +115,7 @@
- name: verify test remove snapshot in check mode - name: verify test remove snapshot in check mode
assert: assert:
that: that:
- snap|changed - snap is changed
- snap.display_name == "{{ cs_resource_prefix }}_snapshot" - snap.display_name == "{{ cs_resource_prefix }}_snapshot"
- name: test remove snapshot - name: test remove snapshot
@ -127,7 +127,7 @@
- name: verify test remove snapshot - name: verify test remove snapshot
assert: assert:
that: that:
- snap|changed - snap is changed
- snap.display_name == "{{ cs_resource_prefix }}_snapshot" - snap.display_name == "{{ cs_resource_prefix }}_snapshot"
- name: test remove snapshot idempotence - name: test remove snapshot idempotence
@ -139,7 +139,7 @@
- name: verify test remove snapshot idempotence - name: verify test remove snapshot idempotence
assert: assert:
that: that:
- not snap|changed - snap is not changed
- name: cleanup instance - name: cleanup instance
cs_instance: cs_instance:
@ -149,4 +149,4 @@
- name: verify destroy instance - name: verify destroy instance
assert: assert:
that: that:
- instance|success - instance is successful

@ -5,7 +5,7 @@
- name: verify setup - name: verify setup
assert: assert:
that: that:
- vol|success - vol is successful
- name: setup instance 1 - name: setup instance 1
cs_instance: cs_instance:
@ -16,7 +16,7 @@
- name: verify create instance - name: verify create instance
assert: assert:
that: that:
- instance|success - instance is successful
- name: setup instance 2 - name: setup instance 2
cs_instance: cs_instance:
@ -27,7 +27,7 @@
- name: verify create instance - name: verify create instance
assert: assert:
that: that:
- instance|success - instance is successful
- name: test fail if missing name - name: test fail if missing name
action: cs_volume action: cs_volume
@ -36,7 +36,7 @@
- name: verify results of fail if missing name - name: verify results of fail if missing name
assert: assert:
that: that:
- vol|failed - vol is failed
- "vol.msg == 'missing required arguments: name'" - "vol.msg == 'missing required arguments: name'"
- name: test create volume in check mode - name: test create volume in check mode
@ -49,7 +49,7 @@
- name: verify results test create volume in check mode - name: verify results test create volume in check mode
assert: assert:
that: that:
- vol|changed - vol is changed
- name: test create volume - name: test create volume
cs_volume: cs_volume:
@ -60,7 +60,7 @@
- name: verify results test create volume - name: verify results test create volume
assert: assert:
that: that:
- vol|changed - vol is changed
- vol.size == 20 * 1024 ** 3 - vol.size == 20 * 1024 ** 3
- vol.name == "{{ cs_resource_prefix }}_vol" - vol.name == "{{ cs_resource_prefix }}_vol"
@ -73,7 +73,7 @@
- name: verify results test create volume idempotence - name: verify results test create volume idempotence
assert: assert:
that: that:
- not vol|changed - vol is not changed
- vol.size == 20 * 1024 ** 3 - vol.size == 20 * 1024 ** 3
- vol.name == "{{ cs_resource_prefix }}_vol" - vol.name == "{{ cs_resource_prefix }}_vol"
@ -88,7 +88,7 @@
- name: verify results test create volume in check mode - name: verify results test create volume in check mode
assert: assert:
that: that:
- vol|changed - vol is changed
- vol.size == 20 * 1024 ** 3 - vol.size == 20 * 1024 ** 3
- vol.name == "{{ cs_resource_prefix }}_vol" - vol.name == "{{ cs_resource_prefix }}_vol"
@ -102,7 +102,7 @@
- name: verify results test create volume - name: verify results test create volume
assert: assert:
that: that:
- vol|changed - vol is changed
- vol.size == 10 * 1024 ** 3 - vol.size == 10 * 1024 ** 3
- vol.name == "{{ cs_resource_prefix }}_vol" - vol.name == "{{ cs_resource_prefix }}_vol"
@ -116,7 +116,7 @@
- name: verify results test create volume - name: verify results test create volume
assert: assert:
that: that:
- not vol|changed - vol is not changed
- vol.size == 10 * 1024 ** 3 - vol.size == 10 * 1024 ** 3
- vol.name == "{{ cs_resource_prefix }}_vol" - vol.name == "{{ cs_resource_prefix }}_vol"
@ -130,7 +130,7 @@
- name: verify results test attach volume in check mode - name: verify results test attach volume in check mode
assert: assert:
that: that:
- vol|changed - vol is changed
- vol.name == "{{ cs_resource_prefix }}_vol" - vol.name == "{{ cs_resource_prefix }}_vol"
- vol.attached is not defined - vol.attached is not defined
@ -143,7 +143,7 @@
- name: verify results test attach volume - name: verify results test attach volume
assert: assert:
that: that:
- vol|changed - vol is changed
- vol.name == "{{ cs_resource_prefix }}_vol" - vol.name == "{{ cs_resource_prefix }}_vol"
- vol.vm == "{{ test_cs_instance_1 }}" - vol.vm == "{{ test_cs_instance_1 }}"
- vol.attached is defined - vol.attached is defined
@ -157,7 +157,7 @@
- name: verify results test attach volume idempotence - name: verify results test attach volume idempotence
assert: assert:
that: that:
- not vol|changed - vol is not changed
- vol.name == "{{ cs_resource_prefix }}_vol" - vol.name == "{{ cs_resource_prefix }}_vol"
- vol.vm == "{{ test_cs_instance_1 }}" - vol.vm == "{{ test_cs_instance_1 }}"
- vol.attached is defined - vol.attached is defined
@ -172,7 +172,7 @@
- name: verify results test attach attached volume to another vm in check mode - name: verify results test attach attached volume to another vm in check mode
assert: assert:
that: that:
- vol|changed - vol is changed
- vol.name == "{{ cs_resource_prefix }}_vol" - vol.name == "{{ cs_resource_prefix }}_vol"
- vol.vm == "{{ test_cs_instance_1 }}" - vol.vm == "{{ test_cs_instance_1 }}"
- vol.attached is defined - vol.attached is defined
@ -186,7 +186,7 @@
- name: verify results test attach attached volume to another vm - name: verify results test attach attached volume to another vm
assert: assert:
that: that:
- vol|changed - vol is changed
- vol.name == "{{ cs_resource_prefix }}_vol" - vol.name == "{{ cs_resource_prefix }}_vol"
- vol.vm == "{{ test_cs_instance_2 }}" - vol.vm == "{{ test_cs_instance_2 }}"
- vol.attached is defined - vol.attached is defined
@ -200,7 +200,7 @@
- name: verify results test attach attached volume to another vm idempotence - name: verify results test attach attached volume to another vm idempotence
assert: assert:
that: that:
- not vol|changed - vol is not changed
- vol.name == "{{ cs_resource_prefix }}_vol" - vol.name == "{{ cs_resource_prefix }}_vol"
- vol.vm == "{{ test_cs_instance_2 }}" - vol.vm == "{{ test_cs_instance_2 }}"
- vol.attached is defined - vol.attached is defined
@ -214,7 +214,7 @@
- name: verify results test detach volume in check mdoe - name: verify results test detach volume in check mdoe
assert: assert:
that: that:
- vol|changed - vol is changed
- vol.name == "{{ cs_resource_prefix }}_vol" - vol.name == "{{ cs_resource_prefix }}_vol"
- vol.attached is defined - vol.attached is defined
@ -226,7 +226,7 @@
- name: verify results test detach volume - name: verify results test detach volume
assert: assert:
that: that:
- vol|changed - vol is changed
- vol.name == "{{ cs_resource_prefix }}_vol" - vol.name == "{{ cs_resource_prefix }}_vol"
- vol.attached is undefined - vol.attached is undefined
@ -238,7 +238,7 @@
- name: verify results test detach volume idempotence - name: verify results test detach volume idempotence
assert: assert:
that: that:
- not vol|changed - vol is not changed
- vol.name == "{{ cs_resource_prefix }}_vol" - vol.name == "{{ cs_resource_prefix }}_vol"
- vol.attached is undefined - vol.attached is undefined
@ -251,7 +251,7 @@
- name: verify results test create volume in check mode - name: verify results test create volume in check mode
assert: assert:
that: that:
- vol|changed - vol is changed
- vol.name == "{{ cs_resource_prefix }}_vol" - vol.name == "{{ cs_resource_prefix }}_vol"
- name: test delete volume - name: test delete volume
@ -262,7 +262,7 @@
- name: verify results test create volume - name: verify results test create volume
assert: assert:
that: that:
- vol|changed - vol is changed
- vol.name == "{{ cs_resource_prefix }}_vol" - vol.name == "{{ cs_resource_prefix }}_vol"
- name: test delete volume idempotence - name: test delete volume idempotence
@ -273,7 +273,7 @@
- name: verify results test delete volume idempotence - name: verify results test delete volume idempotence
assert: assert:
that: that:
- not vol|changed - vol is not changed
- name: cleanup instance 1 - name: cleanup instance 1
cs_instance: cs_instance:
@ -283,7 +283,7 @@
- name: verify create instance - name: verify create instance
assert: assert:
that: that:
- instance|success - instance is successful
- name: cleanup instance 2 - name: cleanup instance 2
cs_instance: cs_instance:
@ -293,4 +293,4 @@
- name: verify create instance - name: verify create instance
assert: assert:
that: that:
- instance|success - instance is successful

@ -8,7 +8,7 @@
- name: verify setup - name: verify setup
assert: assert:
that: that:
- vpc|success - vpc is successful
- name: test fail missing name of vpc - name: test fail missing name of vpc
cs_vpc: cs_vpc:
@ -18,7 +18,7 @@
- name: verify test fail missing name of vpc - name: verify test fail missing name of vpc
assert: assert:
that: that:
- vpc|failed - vpc is failed
- "vpc.msg.startswith('missing required arguments: ')" - "vpc.msg.startswith('missing required arguments: ')"
- name: test fail missing cidr for vpc - name: test fail missing cidr for vpc
@ -30,7 +30,7 @@
- name: verify test fail missing cidr for vpc - name: verify test fail missing cidr for vpc
assert: assert:
that: that:
- vpc|failed - vpc is failed
- 'vpc.msg == "state is present but all of the following are missing: cidr"' - 'vpc.msg == "state is present but all of the following are missing: cidr"'
- name: test fail missing vpc offering not found - name: test fail missing vpc offering not found
@ -44,7 +44,7 @@
- name: verify test fail missing cidr for vpc - name: verify test fail missing cidr for vpc
assert: assert:
that: that:
- vpc|failed - vpc is failed
- 'vpc.msg == "VPC offering not found: does_not_exist"' - 'vpc.msg == "VPC offering not found: does_not_exist"'
- name: test create vpc with custom offering in check mode - name: test create vpc with custom offering in check mode
@ -59,8 +59,8 @@
- name: verify test create vpc with custom offering in check mode - name: verify test create vpc with custom offering in check mode
assert: assert:
that: that:
- vpc|success - vpc is successful
- vpc|changed - vpc is changed
- name: test create vpc with custom offering - name: test create vpc with custom offering
cs_vpc: cs_vpc:
@ -73,8 +73,8 @@
- name: verify test create vpc with custom offering - name: verify test create vpc with custom offering
assert: assert:
that: that:
- vpc|success - vpc is successful
- vpc|changed - vpc is changed
- vpc.name == "{{ cs_resource_prefix }}_vpc_custom" - vpc.name == "{{ cs_resource_prefix }}_vpc_custom"
- vpc.display_text == "{{ cs_resource_prefix }}_display_text_custom" - vpc.display_text == "{{ cs_resource_prefix }}_display_text_custom"
- vpc.cidr == "10.10.1.0/16" - vpc.cidr == "10.10.1.0/16"
@ -90,8 +90,8 @@
- name: verify test create vpc with custom offering idempotence - name: verify test create vpc with custom offering idempotence
assert: assert:
that: that:
- vpc|success - vpc is successful
- not vpc|changed - vpc is not changed
- vpc.name == "{{ cs_resource_prefix }}_vpc_custom" - vpc.name == "{{ cs_resource_prefix }}_vpc_custom"
- vpc.display_text == "{{ cs_resource_prefix }}_display_text_custom" - vpc.display_text == "{{ cs_resource_prefix }}_display_text_custom"
- vpc.cidr == "10.10.1.0/16" - vpc.cidr == "10.10.1.0/16"
@ -107,8 +107,8 @@
- name: verify test create vpc with default offering in check mode - name: verify test create vpc with default offering in check mode
assert: assert:
that: that:
- vpc|success - vpc is successful
- vpc|changed - vpc is changed
- name: test create vpc with default offering - name: test create vpc with default offering
cs_vpc: cs_vpc:
@ -120,8 +120,8 @@
- name: verify test create vpc with default offering - name: verify test create vpc with default offering
assert: assert:
that: that:
- vpc|success - vpc is successful
- vpc|changed - vpc is changed
- vpc.name == "{{ cs_resource_prefix }}_vpc" - vpc.name == "{{ cs_resource_prefix }}_vpc"
- vpc.display_text == "{{ cs_resource_prefix }}_display_text" - vpc.display_text == "{{ cs_resource_prefix }}_display_text"
- vpc.cidr == "10.10.0.0/16" - vpc.cidr == "10.10.0.0/16"
@ -136,8 +136,8 @@
- name: verify test create vpc with default offering idempotence - name: verify test create vpc with default offering idempotence
assert: assert:
that: that:
- vpc|success - vpc is successful
- not vpc|changed - vpc is not changed
- vpc.name == "{{ cs_resource_prefix }}_vpc" - vpc.name == "{{ cs_resource_prefix }}_vpc"
- vpc.display_text == "{{ cs_resource_prefix }}_display_text" - vpc.display_text == "{{ cs_resource_prefix }}_display_text"
- vpc.cidr == "10.10.0.0/16" - vpc.cidr == "10.10.0.0/16"
@ -151,8 +151,8 @@
- name: verify test create vpc idempotence2 - name: verify test create vpc idempotence2
assert: assert:
that: that:
- vpc|success - vpc is successful
- not vpc|changed - vpc is not changed
- vpc.name == "{{ cs_resource_prefix }}_vpc" - vpc.name == "{{ cs_resource_prefix }}_vpc"
- vpc.display_text == "{{ cs_resource_prefix }}_display_text" - vpc.display_text == "{{ cs_resource_prefix }}_display_text"
- vpc.cidr == "10.10.0.0/16" - vpc.cidr == "10.10.0.0/16"
@ -168,8 +168,8 @@
- name: verify test update vpc with default offering in check mode - name: verify test update vpc with default offering in check mode
assert: assert:
that: that:
- vpc|success - vpc is successful
- vpc|changed - vpc is changed
- vpc.name == "{{ cs_resource_prefix }}_vpc" - vpc.name == "{{ cs_resource_prefix }}_vpc"
- vpc.display_text == "{{ cs_resource_prefix }}_display_text" - vpc.display_text == "{{ cs_resource_prefix }}_display_text"
- vpc.cidr == "10.10.0.0/16" - vpc.cidr == "10.10.0.0/16"
@ -184,8 +184,8 @@
- name: verify test update vpc with default offering - name: verify test update vpc with default offering
assert: assert:
that: that:
- vpc|success - vpc is successful
- vpc|changed - vpc is changed
- vpc.name == "{{ cs_resource_prefix }}_vpc" - vpc.name == "{{ cs_resource_prefix }}_vpc"
- vpc.display_text == "{{ cs_resource_prefix }}_display_text2" - vpc.display_text == "{{ cs_resource_prefix }}_display_text2"
- vpc.cidr == "10.10.0.0/16" - vpc.cidr == "10.10.0.0/16"
@ -200,8 +200,8 @@
- name: verify test update vpc idempotence - name: verify test update vpc idempotence
assert: assert:
that: that:
- vpc|success - vpc is successful
- not vpc|changed - vpc is not changed
- vpc.name == "{{ cs_resource_prefix }}_vpc" - vpc.name == "{{ cs_resource_prefix }}_vpc"
- vpc.display_text == "{{ cs_resource_prefix }}_display_text2" - vpc.display_text == "{{ cs_resource_prefix }}_display_text2"
- vpc.cidr == "10.10.0.0/16" - vpc.cidr == "10.10.0.0/16"
@ -219,8 +219,8 @@
- name: verify test restart vpc with default offering with clean up in check mode - name: verify test restart vpc with default offering with clean up in check mode
assert: assert:
that: that:
- vpc|success - vpc is successful
- vpc|changed - vpc is changed
- vpc.name == "{{ cs_resource_prefix }}_vpc" - vpc.name == "{{ cs_resource_prefix }}_vpc"
- vpc.display_text == "{{ cs_resource_prefix }}_display_text2" - vpc.display_text == "{{ cs_resource_prefix }}_display_text2"
- vpc.cidr == "10.10.0.0/16" - vpc.cidr == "10.10.0.0/16"
@ -237,8 +237,8 @@
- name: verify test restart vpc with default offering with clean up - name: verify test restart vpc with default offering with clean up
assert: assert:
that: that:
- vpc|success - vpc is successful
- vpc|changed - vpc is changed
- vpc.name == "{{ cs_resource_prefix }}_vpc" - vpc.name == "{{ cs_resource_prefix }}_vpc"
- vpc.display_text == "{{ cs_resource_prefix }}_display_text2" - vpc.display_text == "{{ cs_resource_prefix }}_display_text2"
- vpc.cidr == "10.10.0.0/16" - vpc.cidr == "10.10.0.0/16"
@ -254,8 +254,8 @@
- name: verify test restart vpc with default offering without clean up - name: verify test restart vpc with default offering without clean up
assert: assert:
that: that:
- vpc|success - vpc is successful
- vpc|changed - vpc is changed
- vpc.name == "{{ cs_resource_prefix }}_vpc" - vpc.name == "{{ cs_resource_prefix }}_vpc"
- vpc.display_text == "{{ cs_resource_prefix }}_display_text2" - vpc.display_text == "{{ cs_resource_prefix }}_display_text2"
- vpc.cidr == "10.10.0.0/16" - vpc.cidr == "10.10.0.0/16"
@ -273,8 +273,8 @@
- name: verify test create network in vpc in check mode - name: verify test create network in vpc in check mode
assert: assert:
that: that:
- vpc_net|success - vpc_net is successful
- vpc_net|changed - vpc_net is changed
- name: test create network in vpc - name: test create network in vpc
cs_network: cs_network:
@ -288,8 +288,8 @@
- name: verify test create network in vpc - name: verify test create network in vpc
assert: assert:
that: that:
- vpc_net|success - vpc_net is successful
- vpc_net|changed - vpc_net is changed
- vpc_net.name == "{{ cs_resource_prefix }}_net_vpc" - vpc_net.name == "{{ cs_resource_prefix }}_net_vpc"
- name: test create network in vpc idempotence - name: test create network in vpc idempotence
@ -304,8 +304,8 @@
- name: verify test create network in vpc idempotence - name: verify test create network in vpc idempotence
assert: assert:
that: that:
- vpc_net|success - vpc_net is successful
- not vpc_net|changed - vpc_net is not changed
- vpc_net.name == "{{ cs_resource_prefix }}_net_vpc" - vpc_net.name == "{{ cs_resource_prefix }}_net_vpc"
- name: test create instance in vpc in check mode - name: test create instance in vpc in check mode
@ -320,8 +320,8 @@
- name: verify test create instance in vpc in check mode - name: verify test create instance in vpc in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- name: test create instance in vpc - name: test create instance in vpc
cs_instance: cs_instance:
@ -334,8 +334,8 @@
- name: verify test create instance in vpc - name: verify test create instance in vpc
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-vpc" - instance.name == "{{ cs_resource_prefix }}-vm-vpc"
- instance.state == "Running" - instance.state == "Running"
@ -350,8 +350,8 @@
- name: verify test create instance in vpc idempotence - name: verify test create instance in vpc idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- instance.name == "{{ cs_resource_prefix }}-vm-vpc" - instance.name == "{{ cs_resource_prefix }}-vm-vpc"
- instance.state == "Running" - instance.state == "Running"
@ -375,8 +375,8 @@
- name: verify test static nat in vpc in check mode - name: verify test static nat in vpc in check mode
assert: assert:
that: that:
- static_nat|success - static_nat is successful
- static_nat|changed - static_nat is changed
- name: test static nat in vpc - name: test static nat in vpc
cs_staticnat: cs_staticnat:
@ -389,8 +389,8 @@
- name: verify test static nat in vpc - name: verify test static nat in vpc
assert: assert:
that: that:
- static_nat|success - static_nat is successful
- static_nat|changed - static_nat is changed
- name: test static nat in vpc idempotence - name: test static nat in vpc idempotence
cs_staticnat: cs_staticnat:
@ -403,8 +403,8 @@
- name: verify test static nat in vpc idempotence - name: verify test static nat in vpc idempotence
assert: assert:
that: that:
- static_nat|success - static_nat is successful
- not static_nat|changed - static_nat is not changed
- name: test remove static nat in vpc in check mode - name: test remove static nat in vpc in check mode
cs_staticnat: cs_staticnat:
@ -419,8 +419,8 @@
- name: verify test remove static nat in vpc in check mode - name: verify test remove static nat in vpc in check mode
assert: assert:
that: that:
- static_nat|success - static_nat is successful
- static_nat|changed - static_nat is changed
- name: test remove static nat in vpc - name: test remove static nat in vpc
cs_staticnat: cs_staticnat:
@ -434,8 +434,8 @@
- name: verify test remove static nat in vpc - name: verify test remove static nat in vpc
assert: assert:
that: that:
- static_nat|success - static_nat is successful
- static_nat|changed - static_nat is changed
- name: test remove static nat in vpc idempotence - name: test remove static nat in vpc idempotence
cs_staticnat: cs_staticnat:
@ -449,8 +449,8 @@
- name: verify test remove static nat in vpc idempotence - name: verify test remove static nat in vpc idempotence
assert: assert:
that: that:
- static_nat|success - static_nat is successful
- not static_nat|changed - static_nat is not changed
- name: test create port forwarding in vpc in check mode - name: test create port forwarding in vpc in check mode
cs_portforward: cs_portforward:
@ -466,8 +466,8 @@
- name: verify test create port forwarding in vpc in check mode - name: verify test create port forwarding in vpc in check mode
assert: assert:
that: that:
- port_forward|success - port_forward is successful
- port_forward|changed - port_forward is changed
- name: test create port forwarding in vpc - name: test create port forwarding in vpc
cs_portforward: cs_portforward:
@ -482,8 +482,8 @@
- name: verify test create port forwarding in vpc - name: verify test create port forwarding in vpc
assert: assert:
that: that:
- port_forward|success - port_forward is successful
- port_forward|changed - port_forward is changed
- name: test create port forwarding in vpc idempotence - name: test create port forwarding in vpc idempotence
cs_portforward: cs_portforward:
@ -498,8 +498,8 @@
- name: verify test create port forwarding in vpc idempotence - name: verify test create port forwarding in vpc idempotence
assert: assert:
that: that:
- port_forward|success - port_forward is successful
- not port_forward|changed - port_forward is not changed
- name: test remove port forwarding in vpc in check mode - name: test remove port forwarding in vpc in check mode
cs_portforward: cs_portforward:
@ -516,8 +516,8 @@
- name: verify test remove port forwarding in vpc in check mode - name: verify test remove port forwarding in vpc in check mode
assert: assert:
that: that:
- port_forward|success - port_forward is successful
- port_forward|changed - port_forward is changed
- name: test remove port forwarding in vpc - name: test remove port forwarding in vpc
cs_portforward: cs_portforward:
@ -533,8 +533,8 @@
- name: verify test remove port forwarding in vpc - name: verify test remove port forwarding in vpc
assert: assert:
that: that:
- port_forward|success - port_forward is successful
- port_forward|changed - port_forward is changed
- name: test remove port forwarding in vpc idempotence - name: test remove port forwarding in vpc idempotence
cs_portforward: cs_portforward:
@ -550,8 +550,8 @@
- name: verify test remove port forwarding in vpc idempotence - name: verify test remove port forwarding in vpc idempotence
assert: assert:
that: that:
- port_forward|success - port_forward is successful
- not port_forward|changed - port_forward is not changed
- name: test remove ip address from vpc - name: test remove ip address from vpc
cs_ip_address: cs_ip_address:
@ -564,8 +564,8 @@
- name: verify test remove ip address from vpc - name: verify test remove ip address from vpc
assert: assert:
that: that:
- ip_address_removed|success - ip_address_removed is successful
- ip_address_removed|changed - ip_address_removed is changed
- name: test remove instance in vpc in check mdoe - name: test remove instance in vpc in check mdoe
cs_instance: cs_instance:
@ -577,8 +577,8 @@
- name: verify test remove instance in vpc in check mode - name: verify test remove instance in vpc in check mode
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-vpc" - instance.name == "{{ cs_resource_prefix }}-vm-vpc"
- instance.state == "Running" - instance.state == "Running"
@ -591,8 +591,8 @@
- name: verify test remove instance in vpc - name: verify test remove instance in vpc
assert: assert:
that: that:
- instance|success - instance is successful
- instance|changed - instance is changed
- instance.name == "{{ cs_resource_prefix }}-vm-vpc" - instance.name == "{{ cs_resource_prefix }}-vm-vpc"
- instance.state == "Running" - instance.state == "Running"
@ -605,8 +605,8 @@
- name: verify test remove instance in vpc idempotence - name: verify test remove instance in vpc idempotence
assert: assert:
that: that:
- instance|success - instance is successful
- not instance|changed - instance is not changed
- name: test remove network in vpc in check mode - name: test remove network in vpc in check mode
cs_network: cs_network:
@ -619,8 +619,8 @@
- name: verify test remove network in vpc in check mode - name: verify test remove network in vpc in check mode
assert: assert:
that: that:
- vpc_net|success - vpc_net is successful
- vpc_net|changed - vpc_net is changed
- vpc_net.name == "{{ cs_resource_prefix }}_net_vpc" - vpc_net.name == "{{ cs_resource_prefix }}_net_vpc"
- name: test remove network in vpc - name: test remove network in vpc
@ -633,8 +633,8 @@
- name: verify test remove network in vpc - name: verify test remove network in vpc
assert: assert:
that: that:
- vpc_net|success - vpc_net is successful
- vpc_net|changed - vpc_net is changed
- vpc_net.name == "{{ cs_resource_prefix }}_net_vpc" - vpc_net.name == "{{ cs_resource_prefix }}_net_vpc"
- name: test remove network in vpc idempotence - name: test remove network in vpc idempotence
@ -647,8 +647,8 @@
- name: verify test remove network in vpc idempotence - name: verify test remove network in vpc idempotence
assert: assert:
that: that:
- vpc_net|success - vpc_net is successful
- not vpc_net|changed - vpc_net is not changed
- name: test remove vpc with default offering in check mode - name: test remove vpc with default offering in check mode
cs_vpc: cs_vpc:
@ -660,8 +660,8 @@
- name: verify test remove vpc with default offering in check mode - name: verify test remove vpc with default offering in check mode
assert: assert:
that: that:
- vpc|success - vpc is successful
- vpc|changed - vpc is changed
- vpc.name == "{{ cs_resource_prefix }}_vpc" - vpc.name == "{{ cs_resource_prefix }}_vpc"
- vpc.display_text == "{{ cs_resource_prefix }}_display_text2" - vpc.display_text == "{{ cs_resource_prefix }}_display_text2"
- vpc.cidr == "10.10.0.0/16" - vpc.cidr == "10.10.0.0/16"
@ -675,8 +675,8 @@
- name: verify test remove vpc with default offering - name: verify test remove vpc with default offering
assert: assert:
that: that:
- vpc|success - vpc is successful
- vpc|changed - vpc is changed
- vpc.name == "{{ cs_resource_prefix }}_vpc" - vpc.name == "{{ cs_resource_prefix }}_vpc"
- vpc.display_text == "{{ cs_resource_prefix }}_display_text2" - vpc.display_text == "{{ cs_resource_prefix }}_display_text2"
- vpc.cidr == "10.10.0.0/16" - vpc.cidr == "10.10.0.0/16"
@ -689,8 +689,8 @@
- name: verify test remove vpc idempotence - name: verify test remove vpc idempotence
assert: assert:
that: that:
- vpc|success - vpc is successful
- not vpc|changed - vpc is not changed
- name: test remove vpc with custom offering - name: test remove vpc with custom offering
cs_vpc: cs_vpc:
@ -701,7 +701,7 @@
- name: verify test remove vpc with custom offering - name: verify test remove vpc with custom offering
assert: assert:
that: that:
- vpc|success - vpc is successful
- vpc|changed - vpc is changed
- vpc.name == "{{ cs_resource_prefix }}_vpc_custom" - vpc.name == "{{ cs_resource_prefix }}_vpc_custom"
- vpc.cidr == "10.10.1.0/16" - vpc.cidr == "10.10.1.0/16"

@ -9,7 +9,7 @@
- name: verify setup vpc - name: verify setup vpc
assert: assert:
that: that:
- vpc|success - vpc is successful
- name: setup vpn gateway absent - name: setup vpn gateway absent
cs_vpn_gateway: cs_vpn_gateway:
@ -20,7 +20,7 @@
- name: verify setup vpn gateway absent - name: verify setup vpn gateway absent
assert: assert:
that: that:
- vpn_gateway|success - vpn_gateway is successful
- name: test fail missing param vpc for vpn gateway - name: test fail missing param vpc for vpn gateway
cs_vpn_gateway: cs_vpn_gateway:
@ -29,7 +29,7 @@
- name: verify test fail missing param vpc for vpn gateway - name: verify test fail missing param vpc for vpn gateway
assert: assert:
that: that:
- vpn_gateway|failed - vpn_gateway is failed
- "vpn_gateway.msg.startswith('missing required arguments: ')" - "vpn_gateway.msg.startswith('missing required arguments: ')"
- name: test create vpn gateway in check mode - name: test create vpn gateway in check mode
@ -41,8 +41,8 @@
- name: verify test create vpn gateway in check mode - name: verify test create vpn gateway in check mode
assert: assert:
that: that:
- vpn_gateway|success - vpn_gateway is successful
- vpn_gateway|changed - vpn_gateway is changed
- name: test create vpn gateway - name: test create vpn gateway
cs_vpn_gateway: cs_vpn_gateway:
@ -52,8 +52,8 @@
- name: verify test create vpn gateway - name: verify test create vpn gateway
assert: assert:
that: that:
- vpn_gateway|success - vpn_gateway is successful
- vpn_gateway|changed - vpn_gateway is changed
- vpn_gateway.vpc == "{{ cs_resource_prefix }}_vpc" - vpn_gateway.vpc == "{{ cs_resource_prefix }}_vpc"
- name: test create vpn gateway idempotence - name: test create vpn gateway idempotence
@ -64,8 +64,8 @@
- name: verify test create vpn gateway idempotence - name: verify test create vpn gateway idempotence
assert: assert:
that: that:
- vpn_gateway|success - vpn_gateway is successful
- not vpn_gateway|changed - vpn_gateway is not changed
- vpn_gateway.vpc == "{{ cs_resource_prefix }}_vpc" - vpn_gateway.vpc == "{{ cs_resource_prefix }}_vpc"
- name: test remove vpn gateway in check mode - name: test remove vpn gateway in check mode
@ -78,8 +78,8 @@
- name: verify test remove vpn gateway in check mode - name: verify test remove vpn gateway in check mode
assert: assert:
that: that:
- vpn_gateway|success - vpn_gateway is successful
- vpn_gateway|changed - vpn_gateway is changed
- vpn_gateway.vpc == "{{ cs_resource_prefix }}_vpc" - vpn_gateway.vpc == "{{ cs_resource_prefix }}_vpc"
- name: test remove vpn gateway - name: test remove vpn gateway
@ -91,8 +91,8 @@
- name: verify test remove vpn gateway - name: verify test remove vpn gateway
assert: assert:
that: that:
- vpn_gateway|success - vpn_gateway is successful
- vpn_gateway|changed - vpn_gateway is changed
- vpn_gateway.vpc == "{{ cs_resource_prefix }}_vpc" - vpn_gateway.vpc == "{{ cs_resource_prefix }}_vpc"
- name: test remove vpn gateway idempotence - name: test remove vpn gateway idempotence
@ -104,5 +104,5 @@
- name: verify test remove vpn gateway idempotence - name: verify test remove vpn gateway idempotence
assert: assert:
that: that:
- vpn_gateway|success - vpn_gateway is successful
- not vpn_gateway|changed - vpn_gateway is not changed

@ -7,7 +7,7 @@
- name: verify setup zone absent - name: verify setup zone absent
assert: assert:
that: that:
- zone|success - zone is successful
- name: test fail missing param - name: test fail missing param
cs_zone: cs_zone:
@ -17,7 +17,7 @@
- name: verify test fail missing param - name: verify test fail missing param
assert: assert:
that: that:
- zone|failed - zone is failed
- "zone.msg == 'missing required arguments: dns1'" - "zone.msg == 'missing required arguments: dns1'"
- name: test create zone in check mode - name: test create zone in check mode
@ -31,8 +31,8 @@
- name: verify test create zone in check mode - name: verify test create zone in check mode
assert: assert:
that: that:
- zone|success - zone is successful
- zone|changed - zone is changed
- name: test create zone - name: test create zone
cs_zone: cs_zone:
@ -44,8 +44,8 @@
- name: verify test create zone - name: verify test create zone
assert: assert:
that: that:
- zone|success - zone is successful
- zone|changed - zone is changed
- zone.dns1 == "8.8.8.8" - zone.dns1 == "8.8.8.8"
- zone.dns2 == "8.8.4.4" - zone.dns2 == "8.8.4.4"
- zone.internal_dns1 == "8.8.8.8" - zone.internal_dns1 == "8.8.8.8"
@ -66,8 +66,8 @@
- name: verify test create zone idempotency - name: verify test create zone idempotency
assert: assert:
that: that:
- zone|success - zone is successful
- not zone|changed - zone is not changed
- zone.dns1 == "8.8.8.8" - zone.dns1 == "8.8.8.8"
- zone.dns2 == "8.8.4.4" - zone.dns2 == "8.8.4.4"
- zone.internal_dns1 == "8.8.8.8" - zone.internal_dns1 == "8.8.8.8"
@ -92,8 +92,8 @@
- name: verify test update zone in check mode - name: verify test update zone in check mode
assert: assert:
that: that:
- zone|success - zone is successful
- zone|changed - zone is changed
- zone.dns1 == "8.8.8.8" - zone.dns1 == "8.8.8.8"
- zone.dns2 == "8.8.4.4" - zone.dns2 == "8.8.4.4"
- zone.internal_dns1 == "8.8.8.8" - zone.internal_dns1 == "8.8.8.8"
@ -117,8 +117,8 @@
- name: verify test update zone - name: verify test update zone
assert: assert:
that: that:
- zone|success - zone is successful
- zone|changed - zone is changed
- zone.dns1 == "8.8.8.8" - zone.dns1 == "8.8.8.8"
- zone.dns2 == "8.8.4.4" - zone.dns2 == "8.8.4.4"
- zone.internal_dns1 == "10.10.1.100" - zone.internal_dns1 == "10.10.1.100"
@ -142,8 +142,8 @@
- name: verify test update zone idempotency - name: verify test update zone idempotency
assert: assert:
that: that:
- zone|success - zone is successful
- not zone|changed - zone is not changed
- zone.dns1 == "8.8.8.8" - zone.dns1 == "8.8.8.8"
- zone.dns2 == "8.8.4.4" - zone.dns2 == "8.8.4.4"
- zone.internal_dns1 == "10.10.1.100" - zone.internal_dns1 == "10.10.1.100"
@ -163,8 +163,8 @@
- name: verify test absent zone in check mode - name: verify test absent zone in check mode
assert: assert:
that: that:
- zone|success - zone is successful
- zone|changed - zone is changed
- zone.dns1 == "8.8.8.8" - zone.dns1 == "8.8.8.8"
- zone.dns2 == "8.8.4.4" - zone.dns2 == "8.8.4.4"
- zone.internal_dns1 == "10.10.1.100" - zone.internal_dns1 == "10.10.1.100"
@ -182,8 +182,8 @@
- name: verify test absent zone - name: verify test absent zone
assert: assert:
that: that:
- zone|success - zone is successful
- zone|changed - zone is changed
- zone.dns1 == "8.8.8.8" - zone.dns1 == "8.8.8.8"
- zone.dns2 == "8.8.4.4" - zone.dns2 == "8.8.4.4"
- zone.internal_dns1 == "10.10.1.100" - zone.internal_dns1 == "10.10.1.100"
@ -201,5 +201,5 @@
- name: verify test absent zone idempotency - name: verify test absent zone idempotency
assert: assert:
that: that:
- zone|success - zone is successful
- not zone|changed - zone is not changed

@ -9,7 +9,7 @@
- name: verify setup zone is present - name: verify setup zone is present
assert: assert:
that: that:
- zone|success - zone is successful
- name: get facts from zone in check mode - name: get facts from zone in check mode
cs_zone_facts: cs_zone_facts:
@ -19,8 +19,8 @@
- name: verify get facts from zone in check mode - name: verify get facts from zone in check mode
assert: assert:
that: that:
- zone|success - zone is successful
- not zone|changed - zone is not changed
- cloudstack_zone.dns1 == "8.8.8.8" - cloudstack_zone.dns1 == "8.8.8.8"
- cloudstack_zone.dns2 == "8.8.4.4" - cloudstack_zone.dns2 == "8.8.4.4"
- cloudstack_zone.internal_dns1 == "8.8.8.8" - cloudstack_zone.internal_dns1 == "8.8.8.8"
@ -39,8 +39,8 @@
- name: verify get facts from zone - name: verify get facts from zone
assert: assert:
that: that:
- zone|success - zone is successful
- not zone|changed - zone is not changed
- cloudstack_zone.dns1 == "8.8.8.8" - cloudstack_zone.dns1 == "8.8.8.8"
- cloudstack_zone.dns2 == "8.8.4.4" - cloudstack_zone.dns2 == "8.8.4.4"
- cloudstack_zone.internal_dns1 == "8.8.8.8" - cloudstack_zone.internal_dns1 == "8.8.8.8"

@ -11,7 +11,7 @@
# some dnf python files after the package is uninstalled. # some dnf python files after the package is uninstalled.
- name: uninstall python2-dnf with shell - name: uninstall python2-dnf with shell
shell: dnf -y remove python2-dnf shell: dnf -y remove python2-dnf
when: rpm_result|success when: rpm_result is successful
# UNINSTALL # UNINSTALL
# With 'python2-dnf' uninstalled, the first call to 'dnf' should install # With 'python2-dnf' uninstalled, the first call to 'dnf' should install
@ -203,7 +203,7 @@
- name: check non-existent rpm install failed - name: check non-existent rpm install failed
assert: assert:
that: that:
- non_existent_rpm|failed - non_existent_rpm is failed
# Install in installroot='/'. This should be identical to default # Install in installroot='/'. This should be identical to default
- name: install sos in / - name: install sos in /
@ -345,7 +345,7 @@
assert: assert:
that: that:
- "not dnf_result.changed" - "not dnf_result.changed"
- "dnf_result|failed" - "dnf_result is failed"
- name: verify dnf module outputs - name: verify dnf module outputs
assert: assert:
@ -363,7 +363,7 @@
- name: verify installation failed - name: verify installation failed
assert: assert:
that: that:
- "dnf_result|failed" - "dnf_result is failed"
- "not dnf_result.changed" - "not dnf_result.changed"
- name: verify dnf module outputs - name: verify dnf module outputs
@ -382,7 +382,7 @@
- name: verify installation failed - name: verify installation failed
assert: assert:
that: that:
- "dnf_result|failed" - "dnf_result is failed"
- "not dnf_result.changed" - "not dnf_result.changed"
- name: verify dnf module outputs - name: verify dnf module outputs

@ -7,10 +7,10 @@
package: package:
state: present state: present
name: nmap-ncat name: nmap-ncat
when: ansible_distribution == 'Fedora' or (ansible_os_family == 'RedHat' and ansible_distribution_version|version_compare(7, '>=')) when: ansible_distribution == 'Fedora' or (ansible_os_family == 'RedHat' and ansible_distribution_version is version(7, '>='))
- name: Install netcat (RHEL) - name: Install netcat (RHEL)
package: package:
state: present state: present
name: nc name: nc
when: ansible_distribution != 'Fedora' and (ansible_os_family == 'RedHat' and ansible_distribution_version|version_compare(7, '<')) when: ansible_distribution != 'Fedora' and (ansible_os_family == 'RedHat' and ansible_distribution_version is version(7, '<'))

@ -17,8 +17,8 @@
- name: it should skip, change and create - name: it should skip, change and create
assert: assert:
that: that:
- result|skipped - result is skipped
- result|changed - result is changed
- result.created - result.created
@ -36,7 +36,7 @@
- name: it should fail with an AccessDeniedException - name: it should fail with an AccessDeniedException
assert: assert:
that: that:
- result|failed - result is failed
- '"AccessDeniedException" in result.msg' - '"AccessDeniedException" in result.msg'
@ -52,7 +52,7 @@
- name: it should change and create - name: it should change and create
assert: assert:
that: that:
- result|changed - result is changed
- result.created - result.created
@ -69,8 +69,8 @@
- name: it should not skip, should not change - name: it should not skip, should not change
assert: assert:
that: that:
- not result|skipped - result is not skipped
- not result|changed - result is not changed
- name: When creating a repository that already exists - name: When creating a repository that already exists
@ -85,7 +85,7 @@
- name: it should not change - name: it should not change
assert: assert:
that: that:
- not result|changed - result is not changed
- name: When in check mode, and deleting a policy that does not exists - name: When in check mode, and deleting a policy that does not exists
@ -102,8 +102,8 @@
- name: it should not skip and not change - name: it should not skip and not change
assert: assert:
that: that:
- not result|skipped - result is not skipped
- not result|changed - result is not changed
- name: When in check mode, setting policy on a repository that has no policy - name: When in check mode, setting policy on a repository that has no policy
@ -120,8 +120,8 @@
- name: it should skip, change and not create - name: it should skip, change and not create
assert: assert:
that: that:
- result|skipped - result is skipped
- result|changed - result is changed
- not result.created - not result.created
@ -138,7 +138,7 @@
- name: it should change and not create - name: it should change and not create
assert: assert:
that: that:
- result|changed - result is changed
- not result.created - not result.created
@ -156,8 +156,8 @@
- name: it should skip, change but not create - name: it should skip, change but not create
assert: assert:
that: that:
- result|skipped - result is skipped
- result|changed - result is changed
- not result.created - not result.created
@ -174,7 +174,7 @@
- name: it should change and not create - name: it should change and not create
assert: assert:
that: that:
- result|changed - result is changed
- not result.created - not result.created
@ -191,7 +191,7 @@
- name: it should change and not create - name: it should change and not create
assert: assert:
that: that:
- result|changed - result is changed
- not result.created - not result.created
@ -208,7 +208,7 @@
- name: it should not change - name: it should not change
assert: assert:
that: that:
- not result|changed - result is not changed
- name: When omitting policy on a repository that has a policy - name: When omitting policy on a repository that has a policy
@ -223,7 +223,7 @@
- name: it should not change - name: it should not change
assert: assert:
that: that:
- not result|changed - result is not changed
- name: When specifying both policy and delete_policy - name: When specifying both policy and delete_policy
@ -241,7 +241,7 @@
- name: it should fail - name: it should fail
assert: assert:
that: that:
- result|failed - result is failed
- name: When specifying invalid JSON for policy - name: When specifying invalid JSON for policy
@ -258,7 +258,7 @@
- name: it should fail - name: it should fail
assert: assert:
that: that:
- result|failed - result is failed
- name: When in check mode, deleting a policy that exists - name: When in check mode, deleting a policy that exists
@ -275,8 +275,8 @@
- name: it should skip, change and not create - name: it should skip, change and not create
assert: assert:
that: that:
- result|skipped - result is skipped
- result|changed - result is changed
- not result.created - not result.created
@ -293,7 +293,7 @@
- name: it should change - name: it should change
assert: assert:
that: that:
- result|changed - result is changed
- name: When in check mode, deleting a policy that does not exist - name: When in check mode, deleting a policy that does not exist
@ -310,8 +310,8 @@
- name: it should not change - name: it should not change
assert: assert:
that: that:
- not result|skipped - result is not skipped
- not result|changed - result is not changed
- name: When deleting a policy that does not exist - name: When deleting a policy that does not exist
@ -327,7 +327,7 @@
- name: it should not change - name: it should not change
assert: assert:
that: that:
- not result|changed - result is not changed
always: always:

@ -63,7 +63,7 @@
assert: assert:
that: that:
- "fetch_missing_nofail.msg" - "fetch_missing_nofail.msg"
- "not fetch_missing_nofail|changed" - "fetch_missing_nofail is not changed"
- name: attempt to fetch a non-existent file - fail on missing - name: attempt to fetch a non-existent file - fail on missing
fetch: src={{ output_dir }}/doesnotexist dest={{ output_dir }}/fetched fail_on_missing=yes fetch: src={{ output_dir }}/doesnotexist dest={{ output_dir }}/fetched fail_on_missing=yes
@ -73,9 +73,9 @@
- name: check fetch missing with failure - name: check fetch missing with failure
assert: assert:
that: that:
- "fetch_missing|failed" - "fetch_missing is failed"
- "fetch_missing.msg" - "fetch_missing.msg"
- "not fetch_missing|changed" - "fetch_missing is not changed"
- name: attempt to fetch a directory - should not fail but return a message - name: attempt to fetch a directory - should not fail but return a message
fetch: src={{ output_dir }} dest={{ output_dir }}/somedir fail_on_missing=False fetch: src={{ output_dir }} dest={{ output_dir }}/somedir fail_on_missing=False
@ -84,7 +84,7 @@
- name: check fetch directory result - name: check fetch directory result
assert: assert:
that: that:
- "not fetch_dir|changed" - "fetch_dir is not changed"
- "fetch_dir.msg" - "fetch_dir.msg"
- name: attempt to fetch a directory - should fail - name: attempt to fetch a directory - should fail
@ -95,7 +95,7 @@
- name: check fetch directory result - name: check fetch directory result
assert: assert:
that: that:
- "failed_fetch_dir|failed" - "failed_fetch_dir is failed"
- "fetch_dir.msg" - "fetch_dir.msg"
- name: create symlink to a file that we can fetch - name: create symlink to a file that we can fetch
@ -134,5 +134,5 @@
- name: check that it indeed failed - name: check that it indeed failed
assert: assert:
that: that:
- "failed_fetch_dest_dir|failed" - "failed_fetch_dest_dir is failed"
- "failed_fetch_dest_dir.msg" - "failed_fetch_dest_dir.msg"

@ -20,7 +20,7 @@ Dumping the same structure to YAML, but don't pretty print
From a recorded task, the changed, failed, success, and skipped From a recorded task, the changed, failed, success, and skipped
filters are shortcuts to ask if those tasks produced changes, failed, tests are shortcuts to ask if those tasks produced changes, failed,
succeeded, or skipped (as one might guess). succeeded, or skipped (as one might guess).
Changed = True Changed = True

@ -124,8 +124,7 @@
- "'local' == ['localhost']|map('extract',hostvars,'ansible_connection')|list|first" - "'local' == ['localhost']|map('extract',hostvars,'ansible_connection')|list|first"
- "'local' == ['localhost']|map('extract',hostvars,['ansible_connection'])|list|first" - "'local' == ['localhost']|map('extract',hostvars,['ansible_connection'])|list|first"
# map was added to jinja2 in version 2.7 # map was added to jinja2 in version 2.7
when: "{{ ( lookup('pipe', '{{ ansible_python[\"executable\"] }} -c \"import jinja2; print(jinja2.__version__)\"') | when: "{{ ( lookup('pipe', '{{ ansible_python[\"executable\"] }} -c \"import jinja2; print(jinja2.__version__)\"') is version('2.7', '>=') ) }}"
version_compare('2.7', '>=') ) }}"
- name: Test json_query filter - name: Test json_query filter
assert: assert:
@ -167,5 +166,5 @@
- name: Verify urlsplit filter showed an error message - name: Verify urlsplit filter showed an error message
assert: assert:
that: that:
- _bad_urlsplit_filter | failed - _bad_urlsplit_filter is failed
- "'unknown URL component' in _bad_urlsplit_filter.msg" - "'unknown URL component' in _bad_urlsplit_filter.msg"

@ -14,13 +14,13 @@ Dumping the same structure to YAML, but don't pretty print
{{ some_structure | to_yaml }} {{ some_structure | to_yaml }}
From a recorded task, the changed, failed, success, and skipped From a recorded task, the changed, failed, success, and skipped
filters are shortcuts to ask if those tasks produced changes, failed, tests are shortcuts to ask if those tasks produced changes, failed,
succeeded, or skipped (as one might guess). succeeded, or skipped (as one might guess).
Changed = {{ some_registered_var | changed }} Changed = {{ some_registered_var is changed }}
Failed = {{ some_registered_var | failed }} Failed = {{ some_registered_var is failed }}
Success = {{ some_registered_var | success }} Success = {{ some_registered_var is successful }}
Skipped = {{ some_registered_var | skipped }} Skipped = {{ some_registered_var is skipped }}
The mandatory filter fails if a variable is not defined and returns the value. The mandatory filter fails if a variable is not defined and returns the value.
To avoid breaking this test, this variable is already defined. To avoid breaking this test, this variable is already defined.

@ -111,8 +111,8 @@
- name: Assert that the file was not downloaded - name: Assert that the file was not downloaded
assert: assert:
that: that:
- "result|failed" - "result is failed"
- "'Failed to validate the SSL certificate' in result.msg or (result.msg | match('hostname .* doesn.t match .*'))" - "'Failed to validate the SSL certificate' in result.msg or ( result.msg is match('hostname .* doesn.t match .*'))"
- "stat_result.stat.exists == false" - "stat_result.stat.exists == false"
- name: test https fetch to a site with mismatched hostname and certificate and validate_certs=no - name: test https fetch to a site with mismatched hostname and certificate and validate_certs=no
@ -156,7 +156,7 @@
- name: Assert that hostname verification failed because SNI is not supported on this version of python - name: Assert that hostname verification failed because SNI is not supported on this version of python
assert: assert:
that: that:
- 'get_url_result|failed' - 'get_url_result is failed'
when: "{{ not python_has_ssl_context }}" when: "{{ not python_has_ssl_context }}"
# These tests are just side effects of how the site is hosted. It's not # These tests are just side effects of how the site is hosted. It's not
@ -177,14 +177,14 @@
assert: assert:
that: that:
- 'data_result.rc == 0' - 'data_result.rc == 0'
- 'not get_url_result|failed' - 'get_url_result is not failed'
when: "{{ python_has_ssl_context }}" when: "{{ python_has_ssl_context }}"
# If the client doesn't support SNI then get_url should have failed with a certificate mismatch # If the client doesn't support SNI then get_url should have failed with a certificate mismatch
- name: Assert that hostname verification failed because SNI is not supported on this version of python - name: Assert that hostname verification failed because SNI is not supported on this version of python
assert: assert:
that: that:
- 'get_url_result|failed' - 'get_url_result is failed'
when: "{{ not python_has_ssl_context }}" when: "{{ not python_has_ssl_context }}"
# End hacky SNI test section # End hacky SNI test section

@ -18,7 +18,7 @@
that: (git_archive.results | map(attribute='changed') | unique | list)[0] that: (git_archive.results | map(attribute='changed') | unique | list)[0]
when: when:
- "ansible_os_family == 'RedHat'" - "ansible_os_family == 'RedHat'"
- ansible_distribution_major_version | version_compare('7', '>=') - ansible_distribution_major_version is version('7', '>=')
- name: ARCHIVE | Check if archive file is created or not - name: ARCHIVE | Check if archive file is created or not
stat: stat:
@ -31,7 +31,7 @@
that: (archive_check.results | map(attribute='stat.exists') | unique | list)[0] that: (archive_check.results | map(attribute='stat.exists') | unique | list)[0]
when: when:
- "ansible_os_family == 'RedHat'" - "ansible_os_family == 'RedHat'"
- ansible_distribution_major_version | version_compare('7', '>=') - ansible_distribution_major_version is version('7', '>=')
- name: ARCHIVE | Clear checkout_dir - name: ARCHIVE | Clear checkout_dir
file: file:
@ -60,7 +60,7 @@
that: (git_archive.results | map(attribute='changed') | unique | list)[0] that: (git_archive.results | map(attribute='changed') | unique | list)[0]
when: when:
- "ansible_os_family == 'RedHat'" - "ansible_os_family == 'RedHat'"
- ansible_distribution_major_version | version_compare('7', '>=') - ansible_distribution_major_version is version('7', '>=')
- name: ARCHIVE | Check if archive file is created or not - name: ARCHIVE | Check if archive file is created or not
stat: stat:
@ -73,4 +73,4 @@
that: (archive_check.results | map(attribute='stat.exists') | unique | list)[0] that: (archive_check.results | map(attribute='stat.exists') | unique | list)[0]
when: when:
- "ansible_os_family == 'RedHat'" - "ansible_os_family == 'RedHat'"
- ansible_distribution_major_version | version_compare('7', '>=') - ansible_distribution_major_version is version('7', '>=')

@ -18,7 +18,7 @@
register: clone2 register: clone2
- assert: - assert:
that: "clone2|success" that: "clone2 is successful"
- name: CHANGE-REPO-URL | check url updated - name: CHANGE-REPO-URL | check url updated
shell: git remote show origin | grep Fetch shell: git remote show origin | grep Fetch
@ -63,7 +63,7 @@
- name: CHANGE-REPO-URL | check repo not changed - name: CHANGE-REPO-URL | check repo not changed
assert: assert:
that: that:
- not checkout_same_url|changed - checkout_same_url is not changed
- name: CHANGE-REPO-URL | clone repo with new url to same destination - name: CHANGE-REPO-URL | clone repo with new url to same destination
@ -75,7 +75,7 @@
- name: CHANGE-REPO-URL | check repo changed - name: CHANGE-REPO-URL | check repo changed
assert: assert:
that: that:
- checkout_new_url|changed - checkout_new_url is changed
- name: CHANGE-REPO-URL | clone repo with new url in check mode - name: CHANGE-REPO-URL | clone repo with new url in check mode
@ -88,8 +88,8 @@
- name: CHANGE-REPO-URL | check repo reported changed in check mode - name: CHANGE-REPO-URL | check repo reported changed in check mode
assert: assert:
that: that:
- checkout_new_url_check_mode | changed - checkout_new_url_check_mode is changed
when: git_version.stdout | version_compare(git_version_supporting_ls_remote, '>=') when: git_version.stdout is version(git_version_supporting_ls_remote, '>=')
- name: CHANGE-REPO-URL | clone repo with new url after check mode - name: CHANGE-REPO-URL | clone repo with new url after check mode
git: git:
@ -100,7 +100,7 @@
- name: CHANGE-REPO-URL | check repo still changed after check mode - name: CHANGE-REPO-URL | check repo still changed after check mode
assert: assert:
that: that:
- checkout_new_url_after_check_mode|changed - checkout_new_url_after_check_mode is changed
# Test that checkout by branch works when the branch is not in our current repo but the sha is # Test that checkout by branch works when the branch is not in our current repo but the sha is

@ -44,7 +44,7 @@
- name: check new head - name: check new head
assert: assert:
that: that:
- not update_new_tag|changed - update_new_tag is not changed
- "'newtag' in listoftags.stdout_lines" - "'newtag' in listoftags.stdout_lines"

@ -21,7 +21,7 @@
- name: DEPTH | make sure the old commit was not fetched - name: DEPTH | make sure the old commit was not fetched
assert: assert:
that: 'checkout_early.rc != 0' that: 'checkout_early.rc != 0'
when: git_version.stdout | version_compare(git_version_supporting_depth, '>=') when: git_version.stdout is version(git_version_supporting_depth, '>=')
# tests https://github.com/ansible/ansible/issues/14954 # tests https://github.com/ansible/ansible/issues/14954
- name: DEPTH | fetch repo again with depth=1 - name: DEPTH | fetch repo again with depth=1
@ -32,8 +32,8 @@
register: checkout2 register: checkout2
- assert: - assert:
that: "not checkout2|changed" that: "checkout2 is not changed"
when: git_version.stdout | version_compare(git_version_supporting_depth, '>=') when: git_version.stdout is version(git_version_supporting_depth, '>=')
- name: DEPTH | again try to access earlier commit - name: DEPTH | again try to access earlier commit
shell: "git checkout {{git_shallow_head_1.stdout}}" shell: "git checkout {{git_shallow_head_1.stdout}}"
@ -45,7 +45,7 @@
- name: DEPTH | again make sure the old commit was not fetched - name: DEPTH | again make sure the old commit was not fetched
assert: assert:
that: 'checkout_early.rc != 0' that: 'checkout_early.rc != 0'
when: git_version.stdout | version_compare(git_version_supporting_depth, '>=') when: git_version.stdout is version(git_version_supporting_depth, '>=')
# make sure we are still able to fetch other versions # make sure we are still able to fetch other versions
- name: DEPTH | Clone same repo with older version - name: DEPTH | Clone same repo with older version
@ -57,7 +57,7 @@
register: cloneold register: cloneold
- assert: - assert:
that: cloneold | success that: cloneold is successful
- name: DEPTH | try to access earlier commit - name: DEPTH | try to access earlier commit
shell: "git checkout {{git_shallow_head_1.stdout}}" shell: "git checkout {{git_shallow_head_1.stdout}}"
@ -79,7 +79,7 @@
register: cloneold register: cloneold
- assert: - assert:
that: cloneold | success that: cloneold is successful
- name: DEPTH | clear checkout_dir - name: DEPTH | clear checkout_dir
file: file:
@ -107,7 +107,7 @@
- name: DEPTH | ensure the fetch succeeded - name: DEPTH | ensure the fetch succeeded
assert: assert:
that: git_fetch | success that: git_fetch is successful
- name: DEPTH | clear checkout_dir - name: DEPTH | clear checkout_dir
@ -132,7 +132,7 @@
- name: DEPTH | ensure the fetch succeeded - name: DEPTH | ensure the fetch succeeded
assert: assert:
that: git_fetch | success that: git_fetch is successful
- name: DEPTH | clear checkout_dir - name: DEPTH | clear checkout_dir
file: file:
@ -165,7 +165,7 @@
assert: assert:
that: that:
- "{{ lookup('file', checkout_dir+'/a' )}} == 3" - "{{ lookup('file', checkout_dir+'/a' )}} == 3"
- git_fetch | changed - git_fetch is changed
- name: DEPTH | clear checkout_dir - name: DEPTH | clear checkout_dir
file: file:

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save