Clean up local_action and delegate_to in tests. (#55835)
* Remove unnecessary delegate_to in tests. * Remove incorrect delegate_to in tests. * Remove unnecessary use of local_action in tests. * Remove incorrect use of local_action in tests. * Remove unnecessary use of local_action in tests. * Remove incorrect use of local_action in tests. * Remove unnecessary use of local_action in tests. * Use delegate_to instead of local_action in tests. * Use setup_remote_tmp_dir instead of TMPDIR.pull/4420/head
parent
2feda390b5
commit
149336319a
|
@ -14,8 +14,8 @@
|
||||||
|
|
||||||
- name: download binary module
|
- name: download binary module
|
||||||
tags: test_binary_modules
|
tags: test_binary_modules
|
||||||
local_action:
|
get_url:
|
||||||
module: get_url
|
|
||||||
url: "https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_binary_modules/{{ module_filename }}"
|
url: "https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_binary_modules/{{ module_filename }}"
|
||||||
dest: "{{ playbook_dir }}/library/{{ module_filename }}"
|
dest: "{{ playbook_dir }}/library/{{ module_filename }}"
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
delegate_to: localhost
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
- prepare_tests
|
- prepare_tests
|
||||||
- setup_rpm_repo
|
- setup_rpm_repo
|
||||||
|
- setup_remote_tmp_dir
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# make a installroot
|
# make a installroot
|
||||||
- name: Create installroot
|
- name: Create installroot
|
||||||
local_action:
|
command: mktemp -d "{{ remote_tmp_dir }}/ansible.test.XXXXXX"
|
||||||
module: command mktemp -d "{{ lookup('env', 'TMPDIR') | default('/tmp', true) }}/ansible.test.XXXXXX"
|
|
||||||
register: dnfroot
|
register: dnfroot
|
||||||
|
|
||||||
- name: Make a necessary directory
|
- name: Make a necessary directory
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# make an installroot
|
# make an installroot
|
||||||
- name: Create installroot
|
- name: Create installroot
|
||||||
local_action:
|
command: mktemp -d "{{ remote_tmp_dir }}/ansible.test.XXXXXX"
|
||||||
module: command mktemp -d "{{lookup('env', 'TMPDIR') | default('/tmp', true)}}/ansible.test.XXXXXX"
|
|
||||||
register: dnfroot
|
register: dnfroot
|
||||||
|
|
||||||
- name: Make a necessary directory
|
- name: Make a necessary directory
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
copy: src="{{ test_pkcs12_path }}" dest="{{output_dir}}/{{ test_pkcs12_path }}"
|
copy: src="{{ test_pkcs12_path }}" dest="{{output_dir}}/{{ test_pkcs12_path }}"
|
||||||
|
|
||||||
- name: import pkcs12
|
- name: import pkcs12
|
||||||
local_action:
|
java_cert:
|
||||||
module: java_cert
|
|
||||||
pkcs12_path: "{{output_dir}}/{{ test_pkcs12_path }}"
|
pkcs12_path: "{{output_dir}}/{{ test_pkcs12_path }}"
|
||||||
pkcs12_password: changeit
|
pkcs12_password: changeit
|
||||||
pkcs12_alias: default
|
pkcs12_alias: default
|
||||||
|
@ -20,8 +19,7 @@
|
||||||
- result_success is successful
|
- result_success is successful
|
||||||
|
|
||||||
- name: import pkcs12 with wrong password
|
- name: import pkcs12 with wrong password
|
||||||
local_action:
|
java_cert:
|
||||||
module: java_cert
|
|
||||||
pkcs12_path: "{{output_dir}}/{{ test_pkcs12_path }}"
|
pkcs12_path: "{{output_dir}}/{{ test_pkcs12_path }}"
|
||||||
pkcs12_password: wrong_pass
|
pkcs12_password: wrong_pass
|
||||||
pkcs12_alias: default
|
pkcs12_alias: default
|
||||||
|
@ -39,8 +37,7 @@
|
||||||
- result_wrong_pass is failed
|
- result_wrong_pass is failed
|
||||||
|
|
||||||
- name: test fail on mutually exclusive params
|
- name: test fail on mutually exclusive params
|
||||||
local_action:
|
java_cert:
|
||||||
module: java_cert
|
|
||||||
cert_path: ca.crt
|
cert_path: ca.crt
|
||||||
pkcs12_path: "{{output_dir}}/{{ test_pkcs12_path }}"
|
pkcs12_path: "{{output_dir}}/{{ test_pkcs12_path }}"
|
||||||
cert_alias: default
|
cert_alias: default
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: request reload with invalid API key
|
- name: request reload with invalid API key
|
||||||
local_action:
|
memset_dns_reload:
|
||||||
module: memset_dns_reload
|
|
||||||
api_key: "wa9aerahhie0eekee9iaphoorovooyia"
|
api_key: "wa9aerahhie0eekee9iaphoorovooyia"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
register: result
|
register: result
|
||||||
|
@ -13,8 +12,7 @@
|
||||||
- result is not successful
|
- result is not successful
|
||||||
|
|
||||||
- name: request reload and poll
|
- name: request reload and poll
|
||||||
local_action:
|
memset_dns_reload:
|
||||||
module: memset_dns_reload
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
poll: true
|
poll: true
|
||||||
register: result
|
register: result
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: query API with invalid API key
|
- name: query API with invalid API key
|
||||||
local_action:
|
memset_memstore_facts:
|
||||||
module: memset_memstore_facts
|
|
||||||
api_key: 'wa9aerahhie0eekee9iaphoorovooyia'
|
api_key: 'wa9aerahhie0eekee9iaphoorovooyia'
|
||||||
name: 'mstestyaa1'
|
name: 'mstestyaa1'
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
@ -14,8 +13,7 @@
|
||||||
- result is not successful
|
- result is not successful
|
||||||
|
|
||||||
- name: request memstore facts
|
- name: request memstore facts
|
||||||
local_action:
|
memset_memstore_facts:
|
||||||
module: memset_memstore_facts
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
name: 'mstestyaa1'
|
name: 'mstestyaa1'
|
||||||
register: result
|
register: result
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: query API with invalid API key
|
- name: query API with invalid API key
|
||||||
local_action:
|
memset_server_facts:
|
||||||
module: memset_server_facts
|
|
||||||
api_key: 'wa9aerahhie0eekee9iaphoorovooyia'
|
api_key: 'wa9aerahhie0eekee9iaphoorovooyia'
|
||||||
name: 'testyaa1'
|
name: 'testyaa1'
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
@ -14,8 +13,7 @@
|
||||||
- result is not successful
|
- result is not successful
|
||||||
|
|
||||||
- name: request server facts
|
- name: request server facts
|
||||||
local_action:
|
memset_server_facts:
|
||||||
module: memset_server_facts
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
name: 'testyaa1'
|
name: 'testyaa1'
|
||||||
register: result
|
register: result
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
zone_name: "{{ 65535 | random | string }}.ansible.example.com"
|
zone_name: "{{ 65535 | random | string }}.ansible.example.com"
|
||||||
|
|
||||||
- name: create zone with incorrect API key
|
- name: create zone with incorrect API key
|
||||||
local_action:
|
memset_zone:
|
||||||
module: memset_zone
|
|
||||||
api_key: "wa9aerahhie0eekee9iaphoorovooyia"
|
api_key: "wa9aerahhie0eekee9iaphoorovooyia"
|
||||||
state: present
|
state: present
|
||||||
name: "{{ zone_name }}"
|
name: "{{ zone_name }}"
|
||||||
|
@ -20,8 +19,7 @@
|
||||||
- result is not successful
|
- result is not successful
|
||||||
|
|
||||||
- name: test creating zone
|
- name: test creating zone
|
||||||
local_action:
|
memset_zone:
|
||||||
module: memset_zone
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
name: "{{ zone_name }}"
|
name: "{{ zone_name }}"
|
||||||
|
@ -36,8 +34,7 @@
|
||||||
- result is successful
|
- result is successful
|
||||||
|
|
||||||
- name: create zone
|
- name: create zone
|
||||||
local_action:
|
memset_zone:
|
||||||
module: memset_zone
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
name: "{{ zone_name }}"
|
name: "{{ zone_name }}"
|
||||||
|
@ -51,8 +48,7 @@
|
||||||
- result is successful
|
- result is successful
|
||||||
|
|
||||||
- name: create duplicate zone
|
- name: create duplicate zone
|
||||||
local_action:
|
memset_zone:
|
||||||
module: memset_zone
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
name: "{{ zone_name }}"
|
name: "{{ zone_name }}"
|
||||||
|
@ -65,8 +61,7 @@
|
||||||
- result is not changed
|
- result is not changed
|
||||||
|
|
||||||
- name: test deleting zone
|
- name: test deleting zone
|
||||||
local_action:
|
memset_zone:
|
||||||
module: memset_zone
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: absent
|
state: absent
|
||||||
name: "{{ zone_name }}"
|
name: "{{ zone_name }}"
|
||||||
|
@ -80,8 +75,7 @@
|
||||||
- result is successful
|
- result is successful
|
||||||
|
|
||||||
- name: delete empty zone
|
- name: delete empty zone
|
||||||
local_action:
|
memset_zone:
|
||||||
module: memset_zone
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: absent
|
state: absent
|
||||||
name: "{{ zone_name }}"
|
name: "{{ zone_name }}"
|
||||||
|
@ -95,8 +89,7 @@
|
||||||
- result is successful
|
- result is successful
|
||||||
|
|
||||||
- name: create zone for deletion test
|
- name: create zone for deletion test
|
||||||
local_action:
|
memset_zone:
|
||||||
module: memset_zone
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
name: "{{ zone_name }}"
|
name: "{{ zone_name }}"
|
||||||
|
@ -109,8 +102,7 @@
|
||||||
- result is successful
|
- result is successful
|
||||||
|
|
||||||
- name: delete zone with force
|
- name: delete zone with force
|
||||||
local_action:
|
memset_zone:
|
||||||
module: memset_zone
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: absent
|
state: absent
|
||||||
name: "{{ zone_name }}"
|
name: "{{ zone_name }}"
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: create domain with invalid API key
|
- name: create domain with invalid API key
|
||||||
local_action:
|
memset_zone_domain:
|
||||||
module: memset_zone_domain
|
|
||||||
api_key: "wa9aerahhie0eekee9iaphoorovooyia"
|
api_key: "wa9aerahhie0eekee9iaphoorovooyia"
|
||||||
state: present
|
state: present
|
||||||
domain: "{{ test_domain }}"
|
domain: "{{ test_domain }}"
|
||||||
|
@ -16,8 +15,7 @@
|
||||||
- result is not successful
|
- result is not successful
|
||||||
|
|
||||||
- name: create domain over 250 chars
|
- name: create domain over 250 chars
|
||||||
local_action:
|
memset_zone_domain:
|
||||||
module: memset_zone_domain
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
domain: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.com'
|
domain: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.com'
|
||||||
|
@ -32,8 +30,7 @@
|
||||||
- "'Zone domain must be less than 250 characters in length' in result.stderr"
|
- "'Zone domain must be less than 250 characters in length' in result.stderr"
|
||||||
|
|
||||||
- name: create domain in non-existent zone
|
- name: create domain in non-existent zone
|
||||||
local_action:
|
memset_zone_domain:
|
||||||
module: memset_zone_domain
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
domain: "{{ test_domain }}"
|
domain: "{{ test_domain }}"
|
||||||
|
@ -48,8 +45,7 @@
|
||||||
- "'does not exist, cannot create domain.' in result.stderr"
|
- "'does not exist, cannot create domain.' in result.stderr"
|
||||||
|
|
||||||
- name: create domain in non-unique zone
|
- name: create domain in non-unique zone
|
||||||
local_action:
|
memset_zone_domain:
|
||||||
module: memset_zone_domain
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
domain: "{{ test_domain }}"
|
domain: "{{ test_domain }}"
|
||||||
|
@ -64,8 +60,7 @@
|
||||||
- "'matches multiple zones, cannot create domain' in result.stderr"
|
- "'matches multiple zones, cannot create domain' in result.stderr"
|
||||||
|
|
||||||
- name: test creating domain
|
- name: test creating domain
|
||||||
local_action:
|
memset_zone_domain:
|
||||||
module: memset_zone_domain
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
domain: "{{ test_domain }}"
|
domain: "{{ test_domain }}"
|
||||||
|
@ -80,8 +75,7 @@
|
||||||
- result is successful
|
- result is successful
|
||||||
|
|
||||||
- name: create domain
|
- name: create domain
|
||||||
local_action:
|
memset_zone_domain:
|
||||||
module: memset_zone_domain
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
domain: "{{ test_domain }}"
|
domain: "{{ test_domain }}"
|
||||||
|
@ -95,8 +89,7 @@
|
||||||
- result is successful
|
- result is successful
|
||||||
|
|
||||||
- name: create existing domain
|
- name: create existing domain
|
||||||
local_action:
|
memset_zone_domain:
|
||||||
module: memset_zone_domain
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
domain: "{{ test_domain }}"
|
domain: "{{ test_domain }}"
|
||||||
|
@ -109,8 +102,7 @@
|
||||||
- result is not changed
|
- result is not changed
|
||||||
|
|
||||||
- name: test deleting domain
|
- name: test deleting domain
|
||||||
local_action:
|
memset_zone_domain:
|
||||||
module: memset_zone_domain
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: absent
|
state: absent
|
||||||
domain: "{{ test_domain }}"
|
domain: "{{ test_domain }}"
|
||||||
|
@ -125,8 +117,7 @@
|
||||||
- result is successful
|
- result is successful
|
||||||
|
|
||||||
- name: delete domain
|
- name: delete domain
|
||||||
local_action:
|
memset_zone_domain:
|
||||||
module: memset_zone_domain
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: absent
|
state: absent
|
||||||
domain: "{{ test_domain }}"
|
domain: "{{ test_domain }}"
|
||||||
|
@ -139,8 +130,7 @@
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: delete non-existent domain
|
- name: delete non-existent domain
|
||||||
local_action:
|
memset_zone_domain:
|
||||||
module: memset_zone_domain
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: absent
|
state: absent
|
||||||
domain: "{{ test_domain }}"
|
domain: "{{ test_domain }}"
|
||||||
|
@ -150,4 +140,4 @@
|
||||||
- name: delete absent domain
|
- name: delete absent domain
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is not changed
|
- result is not changed
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
- name: create record with incorrect API key
|
- name: create record with incorrect API key
|
||||||
local_action:
|
memset_zone_record:
|
||||||
module: memset_zone_record
|
|
||||||
api_key: "wa9aerahhie0eekee9iaphoorovooyia"
|
api_key: "wa9aerahhie0eekee9iaphoorovooyia"
|
||||||
state: present
|
state: present
|
||||||
zone: "{{ test_zone }}"
|
zone: "{{ test_zone }}"
|
||||||
|
@ -15,8 +14,7 @@
|
||||||
- result is not successful
|
- result is not successful
|
||||||
|
|
||||||
- name: create record in non-existent zone
|
- name: create record in non-existent zone
|
||||||
local_action:
|
memset_zone_record:
|
||||||
module: memset_zone_record
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
zone: "a-non-existent-zone"
|
zone: "a-non-existent-zone"
|
||||||
|
@ -32,8 +30,7 @@
|
||||||
- result is not successful
|
- result is not successful
|
||||||
|
|
||||||
- name: create record in non-unique zone
|
- name: create record in non-unique zone
|
||||||
local_action:
|
memset_zone_record:
|
||||||
module: memset_zone_record
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
zone: "{{ duplicate_zone }}"
|
zone: "{{ duplicate_zone }}"
|
||||||
|
@ -49,8 +46,7 @@
|
||||||
- result is not successful
|
- result is not successful
|
||||||
|
|
||||||
- name: create record with invalid priority
|
- name: create record with invalid priority
|
||||||
local_action:
|
memset_zone_record:
|
||||||
module: memset_zone_record
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
zone: "{{ test_zone }}"
|
zone: "{{ test_zone }}"
|
||||||
|
@ -68,8 +64,7 @@
|
||||||
- result is not successful
|
- result is not successful
|
||||||
|
|
||||||
- name: create record with address longer than 250 chars
|
- name: create record with address longer than 250 chars
|
||||||
local_action:
|
memset_zone_record:
|
||||||
module: memset_zone_record
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
zone: "{{ test_zone }}"
|
zone: "{{ test_zone }}"
|
||||||
|
@ -86,8 +81,7 @@
|
||||||
- result is not successful
|
- result is not successful
|
||||||
|
|
||||||
- name: create record longer than 63 chars
|
- name: create record longer than 63 chars
|
||||||
local_action:
|
memset_zone_record:
|
||||||
module: memset_zone_record
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
zone: "{{ test_zone }}"
|
zone: "{{ test_zone }}"
|
||||||
|
@ -104,8 +98,7 @@
|
||||||
- result is not successful
|
- result is not successful
|
||||||
|
|
||||||
- name: create record which cannot have relative enabled
|
- name: create record which cannot have relative enabled
|
||||||
local_action:
|
memset_zone_record:
|
||||||
module: memset_zone_record
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
zone: "{{ test_zone }}"
|
zone: "{{ test_zone }}"
|
||||||
|
@ -122,8 +115,7 @@
|
||||||
- result is not successful
|
- result is not successful
|
||||||
|
|
||||||
- name: test creating valid A record
|
- name: test creating valid A record
|
||||||
local_action:
|
memset_zone_record:
|
||||||
module: memset_zone_record
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
zone: "{{ test_zone }}"
|
zone: "{{ test_zone }}"
|
||||||
|
@ -140,8 +132,7 @@
|
||||||
- result is successful
|
- result is successful
|
||||||
|
|
||||||
- name: actually create valid A record
|
- name: actually create valid A record
|
||||||
local_action:
|
memset_zone_record:
|
||||||
module: memset_zone_record
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
zone: "{{ test_zone }}"
|
zone: "{{ test_zone }}"
|
||||||
|
@ -157,8 +148,7 @@
|
||||||
- result is successful
|
- result is successful
|
||||||
|
|
||||||
- name: create valid SPF record
|
- name: create valid SPF record
|
||||||
local_action:
|
memset_zone_record:
|
||||||
module: memset_zone_record
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: present
|
state: present
|
||||||
zone: "{{ test_zone }}"
|
zone: "{{ test_zone }}"
|
||||||
|
@ -173,8 +163,7 @@
|
||||||
- result is successful
|
- result is successful
|
||||||
|
|
||||||
- name: test deleting A record
|
- name: test deleting A record
|
||||||
local_action:
|
memset_zone_record:
|
||||||
module: memset_zone_record
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: absent
|
state: absent
|
||||||
zone: "{{ test_zone }}"
|
zone: "{{ test_zone }}"
|
||||||
|
@ -191,8 +180,7 @@
|
||||||
- result is successful
|
- result is successful
|
||||||
|
|
||||||
- name: actually delete A record
|
- name: actually delete A record
|
||||||
local_action:
|
memset_zone_record:
|
||||||
module: memset_zone_record
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: absent
|
state: absent
|
||||||
zone: "{{ test_zone }}"
|
zone: "{{ test_zone }}"
|
||||||
|
@ -208,8 +196,7 @@
|
||||||
- result is successful
|
- result is successful
|
||||||
|
|
||||||
- name: delete SPF record
|
- name: delete SPF record
|
||||||
local_action:
|
memset_zone_record:
|
||||||
module: memset_zone_record
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: absent
|
state: absent
|
||||||
zone: "{{ test_zone }}"
|
zone: "{{ test_zone }}"
|
||||||
|
@ -224,8 +211,7 @@
|
||||||
- result is successful
|
- result is successful
|
||||||
|
|
||||||
- name: delete non-existent SPF record
|
- name: delete non-existent SPF record
|
||||||
local_action:
|
memset_zone_record:
|
||||||
module: memset_zone_record
|
|
||||||
api_key: "{{ api_key }}"
|
api_key: "{{ api_key }}"
|
||||||
state: absent
|
state: absent
|
||||||
zone: "{{ test_zone }}"
|
zone: "{{ test_zone }}"
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
- name: Create a local file
|
- name: Create a file
|
||||||
tempfile:
|
tempfile:
|
||||||
state: file
|
state: file
|
||||||
suffix: temp
|
suffix: temp
|
||||||
delegate_to: localhost
|
|
||||||
register: tempfile
|
register: tempfile
|
||||||
|
|
||||||
- import_tasks: aws_s3_create.yml
|
- import_tasks: aws_s3_create.yml
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
- name: Create a destination local file
|
- name: Create a destination file
|
||||||
tempfile:
|
tempfile:
|
||||||
state: file
|
state: file
|
||||||
suffix: temp
|
suffix: temp
|
||||||
delegate_to: localhost
|
|
||||||
register: tempfile_dst
|
register: tempfile_dst
|
||||||
|
|
||||||
- name: Get from bucket
|
- name: Get from bucket
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
- name: create a tempdir for an SSH key
|
- name: create a tempdir for an SSH key
|
||||||
local_action: shell mktemp -d
|
shell: mktemp -d
|
||||||
|
delegate_to: localhost
|
||||||
register: tempdir
|
register: tempdir
|
||||||
|
|
||||||
- name: Generate a local SSH key
|
- name: Generate a local SSH key
|
||||||
local_action: "shell ssh-keygen -b 2048 -t rsa -f {{ tempdir.stdout }}/id_rsa -q -N 'passphrase'"
|
shell: "ssh-keygen -b 2048 -t rsa -f {{ tempdir.stdout }}/id_rsa -q -N 'passphrase'"
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Read the generated key
|
- name: Read the generated key
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
- name: create a tempdir for hostvars
|
- name: create a tempdir for hostvars
|
||||||
local_action: shell mktemp -d
|
shell: mktemp -d
|
||||||
register: tempdir
|
register: tempdir
|
||||||
|
|
||||||
- name: write a file w/ hostvars
|
- name: write a file w/ hostvars
|
||||||
local_action:
|
lineinfile:
|
||||||
module: lineinfile
|
|
||||||
dest: "{{ tempdir.stdout }}/vars"
|
dest: "{{ tempdir.stdout }}/vars"
|
||||||
line: '{"foo": "bar"}'
|
line: '{"foo": "bar"}'
|
||||||
create: true
|
create: true
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
- name: create a tempdir for hostvars
|
- name: create a tempdir for hostvars
|
||||||
local_action: shell mktemp -d
|
shell: mktemp -d
|
||||||
register: tempdir
|
register: tempdir
|
||||||
|
|
||||||
- name: write a file w/ hostvars
|
- name: write a file w/ hostvars
|
||||||
local_action:
|
lineinfile:
|
||||||
module: lineinfile
|
|
||||||
dest: "{{ tempdir.stdout }}/vars"
|
dest: "{{ tempdir.stdout }}/vars"
|
||||||
line: '{"foo": "bar"}'
|
line: '{"foo": "bar"}'
|
||||||
create: true
|
create: true
|
||||||
|
|
|
@ -97,7 +97,6 @@
|
||||||
uplink_teaming_override: yes
|
uplink_teaming_override: yes
|
||||||
vendor_config_override: yes
|
vendor_config_override: yes
|
||||||
vlan_override: yes
|
vlan_override: yes
|
||||||
delegate_to: localhost
|
|
||||||
register: portgroup_create_result
|
register: portgroup_create_result
|
||||||
|
|
||||||
- name: ensure portgroup was created
|
- name: ensure portgroup was created
|
||||||
|
@ -119,7 +118,6 @@
|
||||||
source_port_transmitted: 13
|
source_port_transmitted: 13
|
||||||
source_port_received: 13
|
source_port_received: 13
|
||||||
destination_port: 12
|
destination_port: 12
|
||||||
delegate_to: localhost
|
|
||||||
register: vspan_session_create_result
|
register: vspan_session_create_result
|
||||||
|
|
||||||
- name: ensure session was created
|
- name: ensure session was created
|
||||||
|
@ -136,7 +134,6 @@
|
||||||
switch: dvswitch_0001
|
switch: dvswitch_0001
|
||||||
name: "session_0001"
|
name: "session_0001"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
delegate_to: localhost
|
|
||||||
register: vspan_session_delete_result
|
register: vspan_session_delete_result
|
||||||
|
|
||||||
- name: ensure session was deleted
|
- name: ensure session was deleted
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
# Servers can only be destroyed 5 min after creation
|
# Servers can only be destroyed 5 min after creation
|
||||||
- name: wait for 5 min
|
- name: wait for 5 min
|
||||||
local_action: wait_for
|
wait_for:
|
||||||
when: result is changed
|
when: result is changed
|
||||||
|
|
||||||
- name: test fail if missing name
|
- name: test fail if missing name
|
||||||
|
@ -481,7 +481,7 @@
|
||||||
|
|
||||||
# Servers can only be destroyed 5 min after creation
|
# Servers can only be destroyed 5 min after creation
|
||||||
- name: wait for 5 min
|
- name: wait for 5 min
|
||||||
local_action: wait_for
|
wait_for:
|
||||||
|
|
||||||
- name: test absent server
|
- name: test absent server
|
||||||
vultr_server:
|
vultr_server:
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
# Servers can only be destroyed 5 min after creation
|
# Servers can only be destroyed 5 min after creation
|
||||||
- name: wait for 5 min until VM is absent
|
- name: wait for 5 min until VM is absent
|
||||||
local_action: wait_for
|
wait_for:
|
||||||
when: result is changed
|
when: result is changed
|
||||||
|
|
||||||
- name: test gather vultr server facts - empty resources
|
- name: test gather vultr server facts - empty resources
|
||||||
|
|
|
@ -21,11 +21,13 @@
|
||||||
host_output_dir: "{{ output_dir }}/{{ inventory_hostname }}"
|
host_output_dir: "{{ output_dir }}/{{ inventory_hostname }}"
|
||||||
|
|
||||||
- name: clean out the test directory
|
- name: clean out the test directory
|
||||||
local_action: file name={{ host_output_dir|mandatory }} state=absent
|
file: name={{ host_output_dir|mandatory }} state=absent
|
||||||
|
delegate_to: localhost
|
||||||
run_once: true
|
run_once: true
|
||||||
|
|
||||||
- name: create the test directory
|
- name: create the test directory
|
||||||
local_action: file name={{ host_output_dir }} state=directory
|
file: name={{ host_output_dir }} state=directory
|
||||||
|
delegate_to: localhost
|
||||||
run_once: true
|
run_once: true
|
||||||
|
|
||||||
- name: fetch a small file
|
- name: fetch a small file
|
||||||
|
@ -38,7 +40,8 @@
|
||||||
- "fetch_small.changed"
|
- "fetch_small.changed"
|
||||||
|
|
||||||
- name: check file created by fetch small
|
- name: check file created by fetch small
|
||||||
local_action: stat path={{ fetch_small.dest }}
|
stat: path={{ fetch_small.dest }}
|
||||||
|
delegate_to: localhost
|
||||||
register: fetch_small_stat
|
register: fetch_small_stat
|
||||||
|
|
||||||
- name: verify fetched small file exists locally
|
- name: verify fetched small file exists locally
|
||||||
|
@ -67,7 +70,8 @@
|
||||||
- "fetch_flat.changed"
|
- "fetch_flat.changed"
|
||||||
|
|
||||||
- name: check file created by fetch flat
|
- name: check file created by fetch flat
|
||||||
local_action: stat path="{{ host_output_dir }}/win.ini"
|
stat: path="{{ host_output_dir }}/win.ini"
|
||||||
|
delegate_to: localhost
|
||||||
register: fetch_flat_stat
|
register: fetch_flat_stat
|
||||||
|
|
||||||
- name: verify fetched file exists locally in host_output_dir
|
- name: verify fetched file exists locally in host_output_dir
|
||||||
|
@ -96,7 +100,8 @@
|
||||||
- "fetch_large.changed"
|
- "fetch_large.changed"
|
||||||
|
|
||||||
- name: check file created by fetch large binary
|
- name: check file created by fetch large binary
|
||||||
local_action: stat path={{ fetch_large.dest }}
|
stat: path={{ fetch_large.dest }}
|
||||||
|
delegate_to: localhost
|
||||||
register: fetch_large_stat
|
register: fetch_large_stat
|
||||||
|
|
||||||
- name: verify fetched large file exists locally
|
- name: verify fetched large file exists locally
|
||||||
|
@ -125,7 +130,8 @@
|
||||||
- "fetch_small_bs.changed"
|
- "fetch_small_bs.changed"
|
||||||
|
|
||||||
- name: check file created by fetch small with backslashes
|
- name: check file created by fetch small with backslashes
|
||||||
local_action: stat path={{ fetch_small_bs.dest }}
|
stat: path={{ fetch_small_bs.dest }}
|
||||||
|
delegate_to: localhost
|
||||||
register: fetch_small_bs_stat
|
register: fetch_small_bs_stat
|
||||||
|
|
||||||
- name: verify fetched small file with backslashes exists locally
|
- name: verify fetched small file with backslashes exists locally
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
- prepare_tests
|
- prepare_tests
|
||||||
- setup_rpm_repo
|
- setup_rpm_repo
|
||||||
|
- setup_remote_tmp_dir
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# make a installroot
|
# make a installroot
|
||||||
- name: Create installroot
|
- name: Create installroot
|
||||||
local_action:
|
command: mktemp -d "{{ remote_tmp_dir }}/ansible.test.XXXXXX"
|
||||||
module: command mktemp -d "{{ lookup('env', 'TMPDIR') | default('/tmp', true) }}/ansible.test.XXXXXX"
|
|
||||||
register: yumroot
|
register: yumroot
|
||||||
|
|
||||||
#- name: Populate directory
|
#- name: Populate directory
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
# These two tests are close to documentation example
|
# These two tests are close to documentation example
|
||||||
|
|
||||||
- name: Create a new host or update an existing host's info
|
- name: Create a new host or update an existing host's info
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -47,8 +46,7 @@
|
||||||
register: zabbix_host1
|
register: zabbix_host1
|
||||||
|
|
||||||
- name: Update an existing host's tls settings
|
- name: Update an existing host's tls settings
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
# set up a zabbix proxy to test zabbix_host with
|
# set up a zabbix proxy to test zabbix_host with
|
||||||
|
|
||||||
- name: Create a new proxy
|
- name: Create a new proxy
|
||||||
local_action:
|
zabbix_proxy:
|
||||||
module: zabbix_proxy
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
# remove zabbix_proxy (hopefully) created earlier
|
# remove zabbix_proxy (hopefully) created earlier
|
||||||
|
|
||||||
- name: remove proxy
|
- name: remove proxy
|
||||||
local_action:
|
zabbix_proxy:
|
||||||
module: zabbix_proxy
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: "test: create host with many options set"
|
- name: "test: create host with many options set"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -51,8 +50,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: try to create the same host with the same settings"
|
- name: "test: try to create the same host with the same settings"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -101,8 +99,7 @@
|
||||||
- "not zabbix_host1 is changed"
|
- "not zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change visible_name"
|
- name: "test: change visible_name"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -116,8 +113,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change visible_name (again)"
|
- name: "test: change visible_name (again)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -131,8 +127,7 @@
|
||||||
- "not zabbix_host1 is changed"
|
- "not zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change description"
|
- name: "test: change description"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -146,8 +141,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change description (again)"
|
- name: "test: change description (again)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -161,8 +155,7 @@
|
||||||
- "not zabbix_host1 is changed"
|
- "not zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change host groups (adding one group)"
|
- name: "test: change host groups (adding one group)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -179,8 +172,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change host groups (remove one group)"
|
- name: "test: change host groups (remove one group)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -196,8 +188,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change host groups (add one group using force=no)"
|
- name: "test: change host groups (add one group using force=no)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -214,8 +205,7 @@
|
||||||
|
|
||||||
|
|
||||||
- name: "test: change host groups (check whether we are at three groups)"
|
- name: "test: change host groups (check whether we are at three groups)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -232,8 +222,7 @@
|
||||||
- "not zabbix_host1 is changed"
|
- "not zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change host groups (attempt to remove all host groups)"
|
- name: "test: change host groups (attempt to remove all host groups)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -249,8 +238,7 @@
|
||||||
- "zabbix_host1 is failed"
|
- "zabbix_host1 is failed"
|
||||||
|
|
||||||
- name: "test: change host linked templates (same as before)"
|
- name: "test: change host linked templates (same as before)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -266,8 +254,7 @@
|
||||||
- "not zabbix_host1 is changed"
|
- "not zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change host linked templates (add one template)"
|
- name: "test: change host linked templates (add one template)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -284,8 +271,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change host linked templates (add one template, using force=no)"
|
- name: "test: change host linked templates (add one template, using force=no)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -301,8 +287,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change host linked templates (make sure we are at 4 templates)"
|
- name: "test: change host linked templates (make sure we are at 4 templates)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -320,8 +305,7 @@
|
||||||
- "not zabbix_host1 is changed"
|
- "not zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change host linked templates (remove all templates)"
|
- name: "test: change host linked templates (remove all templates)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -336,8 +320,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change host linked templates (check we have no templates left)"
|
- name: "test: change host linked templates (check we have no templates left)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -352,8 +335,7 @@
|
||||||
- "not zabbix_host1 is changed"
|
- "not zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change host status"
|
- name: "test: change host status"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -367,8 +349,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change host status (again)"
|
- name: "test: change host status (again)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -382,8 +363,7 @@
|
||||||
- "not zabbix_host1 is changed"
|
- "not zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change host inventory mode"
|
- name: "test: change host inventory mode"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -397,8 +377,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change host inventory mode"
|
- name: "test: change host inventory mode"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -412,8 +391,7 @@
|
||||||
- "not zabbix_host1 is changed"
|
- "not zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change host inventory data (one field)"
|
- name: "test: change host inventory data (one field)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -434,8 +412,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change host inventory data (again)"
|
- name: "test: change host inventory data (again)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -456,8 +433,7 @@
|
||||||
- "not zabbix_host1 is changed"
|
- "not zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: remove host proxy"
|
- name: "test: remove host proxy"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -471,8 +447,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: add host proxy"
|
- name: "test: add host proxy"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -486,8 +461,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: add host proxy (again)"
|
- name: "test: add host proxy (again)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -501,8 +475,7 @@
|
||||||
- "not zabbix_host1 is changed"
|
- "not zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change tls settings"
|
- name: "test: change tls settings"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -521,8 +494,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change tls settings (again)"
|
- name: "test: change tls settings (again)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -541,8 +513,7 @@
|
||||||
- "not zabbix_host1 is changed"
|
- "not zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change interface settings (remove one)"
|
- name: "test: change interface settings (remove one)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -562,8 +533,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change interface settings (again)"
|
- name: "test: change interface settings (again)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -583,8 +553,7 @@
|
||||||
- "not zabbix_host1 is changed"
|
- "not zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change interface settings (add one interface using force=no)"
|
- name: "test: change interface settings (add one interface using force=no)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -605,8 +574,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: change interface settings (verify that we are at two interfaces)"
|
- name: "test: change interface settings (verify that we are at two interfaces)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -632,8 +600,7 @@
|
||||||
- "not zabbix_host1 is changed"
|
- "not zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: add IPMI settings"
|
- name: "test: add IPMI settings"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -650,8 +617,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: add IPMI settings again"
|
- name: "test: add IPMI settings again"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -668,8 +634,7 @@
|
||||||
- "zabbix_host1 is not changed"
|
- "zabbix_host1 is not changed"
|
||||||
|
|
||||||
- name: "test: verify that an empty change is idempotent"
|
- name: "test: verify that an empty change is idempotent"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -682,8 +647,7 @@
|
||||||
- "zabbix_host1 is not changed"
|
- "zabbix_host1 is not changed"
|
||||||
|
|
||||||
- name: "test: IPMI set default values"
|
- name: "test: IPMI set default values"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -700,8 +664,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: IPMI set default values (again)"
|
- name: "test: IPMI set default values (again)"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -718,8 +681,7 @@
|
||||||
- "zabbix_host1 is not changed"
|
- "zabbix_host1 is not changed"
|
||||||
|
|
||||||
- name: "test: attempt to delete host created earlier"
|
- name: "test: attempt to delete host created earlier"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
@ -733,8 +695,7 @@
|
||||||
- "zabbix_host1 is changed"
|
- "zabbix_host1 is changed"
|
||||||
|
|
||||||
- name: "test: attempt deleting a non-existant host"
|
- name: "test: attempt deleting a non-existant host"
|
||||||
local_action:
|
zabbix_host:
|
||||||
module: zabbix_host
|
|
||||||
server_url: "{{ zabbix_server_url }}"
|
server_url: "{{ zabbix_server_url }}"
|
||||||
login_user: "{{ zabbix_login_user }}"
|
login_user: "{{ zabbix_login_user }}"
|
||||||
login_password: "{{ zabbix_login_password }}"
|
login_password: "{{ zabbix_login_password }}"
|
||||||
|
|
Loading…
Reference in New Issue