|
11 | 11 | - name: verify update instance ssh key non existent |
12 | 12 | assert: |
13 | 13 | that: |
14 | | - - instance is failed |
15 | | - - 'instance.msg == "SSH key not found: {{ cs_resource_prefix }}-sshkey-does-not-exist"' |
| 14 | + - instance is failed |
| 15 | + - 'instance.msg == "SSH key not found: {{ cs_resource_prefix }}-sshkey-does-not-exist"' |
16 | 16 |
|
17 | 17 | - name: test create instance without keypair in check mode |
18 | 18 | cs_instance: |
|
25 | 25 | - name: verify create instance without keypair in check mode |
26 | 26 | assert: |
27 | 27 | that: |
28 | | - - instance is successful |
29 | | - - instance is changed |
| 28 | + - instance is successful |
| 29 | + - instance is changed |
30 | 30 |
|
31 | 31 | - name: test create instance without keypair |
32 | 32 | cs_instance: |
|
38 | 38 | - name: verify create instance without keypair |
39 | 39 | assert: |
40 | 40 | that: |
41 | | - - instance is successful |
42 | | - - instance is changed |
43 | | - - instance.ssh_key is not defined |
| 41 | + - instance is successful |
| 42 | + - instance is changed |
| 43 | + - instance.ssh_keys is not defined |
44 | 44 |
|
45 | 45 | - name: test create instance without keypair idempotence |
46 | 46 | cs_instance: |
|
52 | 52 | - name: verify create instance without keypair idempotence |
53 | 53 | assert: |
54 | 54 | that: |
55 | | - - instance is successful |
56 | | - - instance is not changed |
57 | | - - instance.ssh_key is not defined |
| 55 | + - instance is successful |
| 56 | + - instance is not changed |
| 57 | + - instance.ssh_keys is not defined |
58 | 58 |
|
59 | 59 | - name: setup ssh key2 |
60 | 60 | cs_sshkeypair: |
|
63 | 63 | - name: verify setup ssh key2 |
64 | 64 | assert: |
65 | 65 | that: |
66 | | - - sshkey is successful |
| 66 | + - sshkey is successful |
67 | 67 |
|
68 | 68 | - name: test update instance ssh key2 in check mode |
69 | 69 | cs_instance: |
|
76 | 76 | - name: verify update instance ssh key2 in check mode |
77 | 77 | assert: |
78 | 78 | that: |
79 | | - - instance is changed |
80 | | - - instance.ssh_key is not defined |
| 79 | + - instance is changed |
| 80 | + - instance.ssh_key is not defined |
81 | 81 |
|
82 | 82 | - name: test update instance ssh key2 |
83 | 83 | cs_instance: |
|
89 | 89 | - name: verify update instance ssh key2 |
90 | 90 | assert: |
91 | 91 | that: |
92 | | - - instance is changed |
93 | | - - instance.ssh_key == "{{ cs_resource_prefix }}-sshkey2" |
| 92 | + - instance is changed |
| 93 | + - instance.ssh_key == "{{ cs_resource_prefix }}-sshkey2" |
94 | 94 |
|
95 | 95 | - name: test update instance ssh key2 idempotence |
96 | 96 | cs_instance: |
|
102 | 102 | - name: verify update instance ssh key2 idempotence |
103 | 103 | assert: |
104 | 104 | that: |
105 | | - - instance is not changed |
106 | | - - instance.ssh_key == "{{ cs_resource_prefix }}-sshkey2" |
| 105 | + - instance is not changed |
| 106 | + - instance.ssh_key == "{{ cs_resource_prefix }}-sshkey2" |
107 | 107 |
|
108 | 108 | - name: cleanup ssh key2 |
109 | 109 | cs_sshkeypair: |
|
113 | 113 | - name: verify cleanup ssh key2 |
114 | 114 | assert: |
115 | 115 | that: |
116 | | - - sshkey2 is successful |
| 116 | + - sshkey2 is successful |
117 | 117 |
|
118 | 118 | - name: test update instance ssh key2 idempotence2 |
119 | 119 | cs_instance: |
|
126 | 126 | - name: verify update instance ssh key2 idempotence2 |
127 | 127 | assert: |
128 | 128 | that: |
129 | | - - instance is failed |
130 | | - - 'instance.msg == "SSH key not found: {{ cs_resource_prefix }}-sshkey2"' |
| 129 | + - instance is failed |
| 130 | + - 'instance.msg == "SSH key not found: {{ cs_resource_prefix }}-sshkey2"' |
131 | 131 |
|
132 | 132 | - name: test update instance ssh key in check mode |
133 | 133 | cs_instance: |
|
140 | 140 | - name: verify update instance ssh key in check mode |
141 | 141 | assert: |
142 | 142 | that: |
143 | | - - instance is changed |
144 | | - - instance.ssh_key is not defined |
| 143 | + - instance is changed |
| 144 | + - instance.ssh_keys is not defined |
145 | 145 |
|
146 | 146 | - name: test update instance ssh key |
147 | 147 | cs_instance: |
|
153 | 153 | - name: verify update instance ssh key |
154 | 154 | assert: |
155 | 155 | that: |
156 | | - - instance is changed |
157 | | - - instance.ssh_key == "{{ cs_resource_prefix }}-sshkey" |
| 156 | + - instance is changed |
| 157 | + - "'{{ cs_resource_prefix }}-sshkey' in instance.ssh_keys" |
158 | 158 |
|
159 | 159 | - name: test update instance ssh key idempotence |
160 | 160 | cs_instance: |
|
166 | 166 | - name: verify update instance ssh key idempotence |
167 | 167 | assert: |
168 | 168 | that: |
169 | | - - instance is not changed |
170 | | - - instance.ssh_key == "{{ cs_resource_prefix }}-sshkey" |
| 169 | + - instance is not changed |
| 170 | + - "'{{ cs_resource_prefix }}-sshkey' in instance.ssh_keys" |
171 | 171 |
|
172 | 172 | - name: cleanup expunge instance |
173 | 173 | cs_instance: |
|
178 | 178 | - name: verify cleanup expunge instance |
179 | 179 | assert: |
180 | 180 | that: |
181 | | - - instance is successful |
| 181 | + - instance is successful |
0 commit comments