|
|
@ -2,6 +2,10 @@
|
|
|
|
- name: Create server group in check mode
|
|
|
|
- name: Create server group in check mode
|
|
|
|
cloudscale_server_group:
|
|
|
|
cloudscale_server_group:
|
|
|
|
name: '{{ cloudscale_resource_prefix }}-grp'
|
|
|
|
name: '{{ cloudscale_resource_prefix }}-grp'
|
|
|
|
|
|
|
|
tags:
|
|
|
|
|
|
|
|
project: ansible-test
|
|
|
|
|
|
|
|
stage: production
|
|
|
|
|
|
|
|
sla: 24-7
|
|
|
|
register: grp
|
|
|
|
register: grp
|
|
|
|
check_mode: yes
|
|
|
|
check_mode: yes
|
|
|
|
- name: 'VERIFY: Create server group in check mode'
|
|
|
|
- name: 'VERIFY: Create server group in check mode'
|
|
|
@ -14,6 +18,10 @@
|
|
|
|
- name: Create server group
|
|
|
|
- name: Create server group
|
|
|
|
cloudscale_server_group:
|
|
|
|
cloudscale_server_group:
|
|
|
|
name: '{{ cloudscale_resource_prefix }}-grp'
|
|
|
|
name: '{{ cloudscale_resource_prefix }}-grp'
|
|
|
|
|
|
|
|
tags:
|
|
|
|
|
|
|
|
project: ansible-test
|
|
|
|
|
|
|
|
stage: production
|
|
|
|
|
|
|
|
sla: 24-7
|
|
|
|
register: grp
|
|
|
|
register: grp
|
|
|
|
- name: 'VERIFY: Create server group'
|
|
|
|
- name: 'VERIFY: Create server group'
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
@ -22,6 +30,9 @@
|
|
|
|
- grp.type == 'anti-affinity'
|
|
|
|
- grp.type == 'anti-affinity'
|
|
|
|
- grp.name == '{{ cloudscale_resource_prefix }}-grp'
|
|
|
|
- grp.name == '{{ cloudscale_resource_prefix }}-grp'
|
|
|
|
- grp.uuid
|
|
|
|
- grp.uuid
|
|
|
|
|
|
|
|
- grp.tags.project == 'ansible-test'
|
|
|
|
|
|
|
|
- grp.tags.stage == 'production'
|
|
|
|
|
|
|
|
- grp.tags.sla == '24-7'
|
|
|
|
|
|
|
|
|
|
|
|
- name: Remember uuid
|
|
|
|
- name: Remember uuid
|
|
|
|
set_fact:
|
|
|
|
set_fact:
|
|
|
@ -30,6 +41,10 @@
|
|
|
|
- name: Create server group idempotence
|
|
|
|
- name: Create server group idempotence
|
|
|
|
cloudscale_server_group:
|
|
|
|
cloudscale_server_group:
|
|
|
|
name: '{{ cloudscale_resource_prefix }}-grp'
|
|
|
|
name: '{{ cloudscale_resource_prefix }}-grp'
|
|
|
|
|
|
|
|
tags:
|
|
|
|
|
|
|
|
project: ansible-test
|
|
|
|
|
|
|
|
stage: production
|
|
|
|
|
|
|
|
sla: 24-7
|
|
|
|
register: grp
|
|
|
|
register: grp
|
|
|
|
- name: 'VERIFY: Create server group idempotence'
|
|
|
|
- name: 'VERIFY: Create server group idempotence'
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
@ -37,11 +52,18 @@
|
|
|
|
- grp is not changed
|
|
|
|
- grp is not changed
|
|
|
|
- grp.name == '{{ cloudscale_resource_prefix }}-grp'
|
|
|
|
- grp.name == '{{ cloudscale_resource_prefix }}-grp'
|
|
|
|
- grp.uuid == server_group_uuid
|
|
|
|
- grp.uuid == server_group_uuid
|
|
|
|
|
|
|
|
- grp.tags.project == 'ansible-test'
|
|
|
|
|
|
|
|
- grp.tags.stage == 'production'
|
|
|
|
|
|
|
|
- grp.tags.sla == '24-7'
|
|
|
|
|
|
|
|
|
|
|
|
- name: Update server group in check mode
|
|
|
|
- name: Update server group in check mode
|
|
|
|
cloudscale_server_group:
|
|
|
|
cloudscale_server_group:
|
|
|
|
uuid: '{{ server_group_uuid }}'
|
|
|
|
uuid: '{{ server_group_uuid }}'
|
|
|
|
name: '{{ cloudscale_resource_prefix }}-grp2'
|
|
|
|
name: '{{ cloudscale_resource_prefix }}-grp2'
|
|
|
|
|
|
|
|
tags:
|
|
|
|
|
|
|
|
project: ansible-test
|
|
|
|
|
|
|
|
stage: staging
|
|
|
|
|
|
|
|
sla: 8-5
|
|
|
|
register: grp
|
|
|
|
register: grp
|
|
|
|
check_mode: yes
|
|
|
|
check_mode: yes
|
|
|
|
- name: 'VERIFY: Update server group in check mode'
|
|
|
|
- name: 'VERIFY: Update server group in check mode'
|
|
|
@ -50,11 +72,18 @@
|
|
|
|
- grp is changed
|
|
|
|
- grp is changed
|
|
|
|
- grp.name == '{{ cloudscale_resource_prefix }}-grp'
|
|
|
|
- grp.name == '{{ cloudscale_resource_prefix }}-grp'
|
|
|
|
- grp.uuid == server_group_uuid
|
|
|
|
- grp.uuid == server_group_uuid
|
|
|
|
|
|
|
|
- grp.tags.project == 'ansible-test'
|
|
|
|
|
|
|
|
- grp.tags.stage == 'production'
|
|
|
|
|
|
|
|
- grp.tags.sla == '24-7'
|
|
|
|
|
|
|
|
|
|
|
|
- name: Update server group
|
|
|
|
- name: Update server group
|
|
|
|
cloudscale_server_group:
|
|
|
|
cloudscale_server_group:
|
|
|
|
uuid: '{{ server_group_uuid }}'
|
|
|
|
uuid: '{{ server_group_uuid }}'
|
|
|
|
name: '{{ cloudscale_resource_prefix }}-grp2'
|
|
|
|
name: '{{ cloudscale_resource_prefix }}-grp2'
|
|
|
|
|
|
|
|
tags:
|
|
|
|
|
|
|
|
project: ansible-test
|
|
|
|
|
|
|
|
stage: staging
|
|
|
|
|
|
|
|
sla: 8-5
|
|
|
|
register: grp
|
|
|
|
register: grp
|
|
|
|
- name: 'VERIFY: Update server group'
|
|
|
|
- name: 'VERIFY: Update server group'
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
@ -62,11 +91,18 @@
|
|
|
|
- grp is changed
|
|
|
|
- grp is changed
|
|
|
|
- grp.name == '{{ cloudscale_resource_prefix }}-grp2'
|
|
|
|
- grp.name == '{{ cloudscale_resource_prefix }}-grp2'
|
|
|
|
- grp.uuid == server_group_uuid
|
|
|
|
- grp.uuid == server_group_uuid
|
|
|
|
|
|
|
|
- grp.tags.project == 'ansible-test'
|
|
|
|
|
|
|
|
- grp.tags.stage == 'staging'
|
|
|
|
|
|
|
|
- grp.tags.sla == '8-5'
|
|
|
|
|
|
|
|
|
|
|
|
- name: Update server group idempotence
|
|
|
|
- name: Update server group idempotence
|
|
|
|
cloudscale_server_group:
|
|
|
|
cloudscale_server_group:
|
|
|
|
uuid: '{{ server_group_uuid }}'
|
|
|
|
uuid: '{{ server_group_uuid }}'
|
|
|
|
name: '{{ cloudscale_resource_prefix }}-grp2'
|
|
|
|
name: '{{ cloudscale_resource_prefix }}-grp2'
|
|
|
|
|
|
|
|
tags:
|
|
|
|
|
|
|
|
project: ansible-test
|
|
|
|
|
|
|
|
stage: staging
|
|
|
|
|
|
|
|
sla: 8-5
|
|
|
|
register: grp
|
|
|
|
register: grp
|
|
|
|
- name: 'VERIFY: Update server group idempotence'
|
|
|
|
- name: 'VERIFY: Update server group idempotence'
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
@ -74,6 +110,9 @@
|
|
|
|
- grp is not changed
|
|
|
|
- grp is not changed
|
|
|
|
- grp.name == '{{ cloudscale_resource_prefix }}-grp2'
|
|
|
|
- grp.name == '{{ cloudscale_resource_prefix }}-grp2'
|
|
|
|
- grp.uuid == server_group_uuid
|
|
|
|
- grp.uuid == server_group_uuid
|
|
|
|
|
|
|
|
- grp.tags.project == 'ansible-test'
|
|
|
|
|
|
|
|
- grp.tags.stage == 'staging'
|
|
|
|
|
|
|
|
- grp.tags.sla == '8-5'
|
|
|
|
|
|
|
|
|
|
|
|
- name: Delete server group in check mode
|
|
|
|
- name: Delete server group in check mode
|
|
|
|
cloudscale_server_group:
|
|
|
|
cloudscale_server_group:
|
|
|
|