1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/cs_resourcelimit/tasks/main.yml

62 lines
1.4 KiB
YAML
Raw Normal View History

---
- name: setup domain
cs_domain: path={{ cs_resource_prefix }}-domain
register: dom
- name: verify setup domain
assert:
that:
- dom|success
- name: setup account
cs_account:
name: "{{ cs_resource_prefix }}_user"
username: "{{ cs_resource_prefix }}_username"
password: "{{ cs_resource_prefix }}_password"
last_name: "{{ cs_resource_prefix }}_last_name"
first_name: "{{ cs_resource_prefix }}_first_name"
email: "{{ cs_resource_prefix }}@example.com"
network_domain: "{{ cs_resource_prefix }}-local"
domain: "{{ cs_resource_prefix }}-domain"
register: acc
- name: verify setup account
assert:
that:
- acc|success
- name: test failed unkonwn type
cs_resourcelimit:
type: unkonwn
limit: 20
domain: "{{ cs_resource_prefix }}-domain"
register: rl
ignore_errors: yes
- name: verify test failed unkonwn type
assert:
that:
- rl|failed
- name: test failed missing type
cs_resourcelimit:
register: rl
ignore_errors: yes
- name: verify test failed missing type
assert:
that:
- rl|failed
- name: setup resource limits domain
cs_resourcelimit:
type: instance
limit: 20
domain: "{{ cs_resource_prefix }}-domain"
register: rl
- name: verify setup resource limits domain
assert:
that:
- rl|success
- rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.limit == 20
- include: instance.yml
- include: cpu.yml