mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
cloudstack: fix pep8 cs_affinitygroup
This commit is contained in:
parent
9fe3891d65
commit
e3f75227bc
2 changed files with 30 additions and 12 deletions
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
- name: setup
|
||||
cs_affinitygroup: name={{ cs_resource_prefix }}_ag state=absent
|
||||
cs_affinitygroup:
|
||||
name: "{{ cs_resource_prefix }}_ag"
|
||||
state: absent
|
||||
register: ag
|
||||
- name: verify setup
|
||||
assert:
|
||||
|
@ -8,7 +10,7 @@
|
|||
- ag|success
|
||||
|
||||
- name: test fail if missing name
|
||||
action: cs_affinitygroup
|
||||
cs_affinitygroup:
|
||||
register: ag
|
||||
ignore_errors: true
|
||||
- name: verify results of fail if missing name
|
||||
|
@ -17,6 +19,18 @@
|
|||
- ag|failed
|
||||
- "ag.msg == 'missing required arguments: name'"
|
||||
|
||||
- name: test fail unknown affinity type
|
||||
cs_affinitygroup:
|
||||
name: "{{ cs_resource_prefix }}_ag"
|
||||
affinty_type: unexistent affinity type
|
||||
register: ag
|
||||
ignore_errors: true
|
||||
- name: verify test fail unknown affinity type
|
||||
assert:
|
||||
that:
|
||||
- ag|failed
|
||||
- "ag.msg == 'affinity group type not found: unexistent affinity type'"
|
||||
|
||||
- name: test present affinity group in check mode
|
||||
cs_affinitygroup: name={{ cs_resource_prefix }}_ag
|
||||
register: ag
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue