blob: 5faa6a9233c66e006f9c211d99345b3247ae90bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
---
- name: setup cpu limits account
cs_resourcelimit:
type: cpu
limit: 20
account: "{{ cs_resource_prefix }}_user"
domain: "{{ cs_resource_prefix }}-domain"
register: rl
- name: verify setup cpu limits account
assert:
that:
- rl|success
- rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.account == "{{ cs_resource_prefix }}_user"
- rl.limit == 20
- rl.resource_type == "cpu"
- name: set cpu limits for domain
cs_resourcelimit:
type: cpu
limit: 12
domain: "{{ cs_resource_prefix }}-domain"
register: rl
- name: verify set cpu limits for domain
assert:
that:
- rl|changed
- rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.limit == 12
- rl.resource_type == "cpu"
- name: set cpu limits for domain idempotence
cs_resourcelimit:
type: cpu
limit: 12
domain: "{{ cs_resource_prefix }}-domain"
register: rl
- name: verify set cpu limits for domain
assert:
that:
- not rl|changed
- rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.limit == 12
- rl.resource_type == "cpu"
- name: set cpu limits for account
cs_resourcelimit:
type: cpu
limit: 10
account: "{{ cs_resource_prefix }}_user"
domain: "{{ cs_resource_prefix }}-domain"
register: rl
- name: verify set cpu limits for account
assert:
that:
- rl|changed
- rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.account == "{{ cs_resource_prefix }}_user"
- rl.limit == 10
- rl.resource_type == "cpu"
- name: set cpu limits for account idempotence
cs_resourcelimit:
type: cpu
limit: 10
account: "{{ cs_resource_prefix }}_user"
domain: "{{ cs_resource_prefix }}-domain"
register: rl
- name: verify set cpu limits for account idempotence
assert:
that:
- not rl|changed
- rl.domain == "{{ cs_resource_prefix }}-domain"
- rl.account == "{{ cs_resource_prefix }}_user"
- rl.limit == 10
- rl.resource_type == "cpu"
|