2016-02-02 19:19:10 +00:00
|
|
|
---
|
|
|
|
- name: test fail if missing name
|
|
|
|
cs_configuration:
|
|
|
|
register: config
|
|
|
|
ignore_errors: true
|
|
|
|
- name: verify results of fail if missing arguments
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- config is failed
|
2017-05-09 11:37:08 +00:00
|
|
|
- "config.msg.startswith('missing required arguments: ')"
|
2016-02-02 19:19:10 +00:00
|
|
|
|
|
|
|
- name: test configuration
|
|
|
|
cs_configuration:
|
|
|
|
name: network.loadbalancer.haproxy.stats.visibility
|
|
|
|
value: global
|
|
|
|
register: config
|
|
|
|
- name: verify test configuration
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- config is successful
|
2016-02-02 19:19:10 +00:00
|
|
|
|
2017-05-26 10:19:47 +00:00
|
|
|
- name: test update configuration string in check mode
|
|
|
|
cs_configuration:
|
|
|
|
name: network.loadbalancer.haproxy.stats.visibility
|
|
|
|
value: all
|
|
|
|
register: config
|
|
|
|
check_mode: true
|
|
|
|
- name: verify test update configuration string in check mode
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- config is successful
|
|
|
|
- config is changed
|
2017-05-26 10:19:47 +00:00
|
|
|
- config.value == "global"
|
|
|
|
- config.name == "network.loadbalancer.haproxy.stats.visibility"
|
|
|
|
|
2016-02-02 19:19:10 +00:00
|
|
|
- name: test update configuration string
|
|
|
|
cs_configuration:
|
|
|
|
name: network.loadbalancer.haproxy.stats.visibility
|
|
|
|
value: all
|
|
|
|
register: config
|
|
|
|
- name: verify test update configuration string
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- config is successful
|
|
|
|
- config is changed
|
2016-02-02 19:19:10 +00:00
|
|
|
- config.value == "all"
|
|
|
|
- config.name == "network.loadbalancer.haproxy.stats.visibility"
|
|
|
|
|
|
|
|
- name: test update configuration string idempotence
|
|
|
|
cs_configuration:
|
|
|
|
name: network.loadbalancer.haproxy.stats.visibility
|
|
|
|
value: all
|
|
|
|
register: config
|
|
|
|
- name: verify test update configuration string idempotence
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- config is successful
|
|
|
|
- config is not changed
|
2016-02-02 19:19:10 +00:00
|
|
|
- config.value == "all"
|
|
|
|
- config.name == "network.loadbalancer.haproxy.stats.visibility"
|
|
|
|
|
|
|
|
- name: test reset configuration string
|
|
|
|
cs_configuration:
|
|
|
|
name: network.loadbalancer.haproxy.stats.visibility
|
|
|
|
value: global
|
|
|
|
register: config
|
|
|
|
- name: verify test reset configuration string
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- config is successful
|
|
|
|
- config is changed
|
2016-02-02 19:19:10 +00:00
|
|
|
- config.value == "global"
|
|
|
|
- config.name == "network.loadbalancer.haproxy.stats.visibility"
|
|
|
|
|
|
|
|
- name: test configuration
|
|
|
|
cs_configuration:
|
|
|
|
name: vmware.recycle.hung.wokervm
|
|
|
|
value: false
|
|
|
|
register: config
|
|
|
|
- name: verify test configuration
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- config is successful
|
2016-02-02 19:19:10 +00:00
|
|
|
|
2017-05-26 10:19:47 +00:00
|
|
|
- name: test update configuration bool in check mode
|
|
|
|
cs_configuration:
|
|
|
|
name: vmware.recycle.hung.wokervm
|
|
|
|
value: true
|
|
|
|
register: config
|
|
|
|
check_mode: true
|
|
|
|
- name: verify test update configuration bool in check mode
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- config is successful
|
|
|
|
- config is changed
|
2017-05-26 10:19:47 +00:00
|
|
|
- config.value == "false"
|
|
|
|
- config.name == "vmware.recycle.hung.wokervm"
|
|
|
|
|
2016-02-02 19:19:10 +00:00
|
|
|
- name: test update configuration bool
|
|
|
|
cs_configuration:
|
|
|
|
name: vmware.recycle.hung.wokervm
|
|
|
|
value: true
|
|
|
|
register: config
|
|
|
|
- name: verify test update configuration bool
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- config is successful
|
|
|
|
- config is changed
|
2016-02-02 19:19:10 +00:00
|
|
|
- config.value == "true"
|
|
|
|
- config.name == "vmware.recycle.hung.wokervm"
|
|
|
|
|
|
|
|
- name: test update configuration bool idempotence
|
|
|
|
cs_configuration:
|
|
|
|
name: vmware.recycle.hung.wokervm
|
|
|
|
value: true
|
|
|
|
register: config
|
|
|
|
- name: verify test update configuration bool idempotence
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- config is successful
|
|
|
|
- config is not changed
|
2016-02-02 19:19:10 +00:00
|
|
|
- config.value == "true"
|
|
|
|
- config.name == "vmware.recycle.hung.wokervm"
|
|
|
|
|
|
|
|
- name: test reset configuration bool
|
|
|
|
cs_configuration:
|
|
|
|
name: vmware.recycle.hung.wokervm
|
|
|
|
value: false
|
|
|
|
register: config
|
|
|
|
- name: verify test reset configuration bool
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- config is successful
|
|
|
|
- config is changed
|
2016-02-02 19:19:10 +00:00
|
|
|
- config.value == "false"
|
|
|
|
- config.name == "vmware.recycle.hung.wokervm"
|
|
|
|
|
|
|
|
- name: test configuration
|
|
|
|
cs_configuration:
|
|
|
|
name: agent.load.threshold
|
|
|
|
value: 0.7
|
|
|
|
register: config
|
|
|
|
- name: verify test configuration
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- config is successful
|
2016-02-02 19:19:10 +00:00
|
|
|
|
2017-05-26 10:19:47 +00:00
|
|
|
- name: test update configuration float in check mode
|
|
|
|
cs_configuration:
|
|
|
|
name: agent.load.threshold
|
|
|
|
value: 0.81
|
|
|
|
register: config
|
|
|
|
check_mode: true
|
|
|
|
- name: verify update configuration float in check mode
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- config is successful
|
|
|
|
- config is changed
|
2017-05-26 10:19:47 +00:00
|
|
|
- config.value == "0.7"
|
|
|
|
- config.name == "agent.load.threshold"
|
|
|
|
|
2016-02-02 19:19:10 +00:00
|
|
|
- name: test update configuration float
|
|
|
|
cs_configuration:
|
|
|
|
name: agent.load.threshold
|
|
|
|
value: 0.81
|
|
|
|
register: config
|
|
|
|
- name: verify update configuration float
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- config is successful
|
|
|
|
- config is changed
|
2016-02-02 19:19:10 +00:00
|
|
|
- config.value == "0.81"
|
|
|
|
- config.name == "agent.load.threshold"
|
|
|
|
|
|
|
|
- name: test update configuration float idempotence
|
|
|
|
cs_configuration:
|
|
|
|
name: agent.load.threshold
|
|
|
|
value: 0.81
|
|
|
|
register: config
|
|
|
|
- name: verify update configuration float idempotence
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- config is successful
|
|
|
|
- config is not changed
|
2016-02-02 19:19:10 +00:00
|
|
|
- config.value == "0.81"
|
|
|
|
- config.name == "agent.load.threshold"
|
|
|
|
|
|
|
|
- name: reset configuration float
|
|
|
|
cs_configuration:
|
|
|
|
name: agent.load.threshold
|
|
|
|
value: 0.7
|
|
|
|
register: config
|
|
|
|
- name: verify reset configuration float
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- config is successful
|
|
|
|
- config is changed
|
2016-02-02 19:19:10 +00:00
|
|
|
- config.value == "0.7"
|
|
|
|
- config.name == "agent.load.threshold"
|
|
|
|
|
|
|
|
- include: storage.yml
|
|
|
|
- include: account.yml
|
|
|
|
- include: zone.yml
|
|
|
|
- include: cluster.yml
|