From 15a7f818e1d8901195bc39058ee5200852a19a5b Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Sun, 23 Aug 2015 22:48:32 +0200 Subject: [PATCH 1/3] cloudstack: add more integration tests --- test/integration/cloudstack.yml | 6 +- .../roles/test_cs_domain/meta/main.yml | 3 + .../roles/test_cs_domain/tasks/main.yml | 112 ++++++++++++++++++ .../roles/test_cs_iso/meta/main.yml | 3 + .../roles/test_cs_iso/tasks/main.yml | 71 +++++++++++ .../roles/test_cs_project/meta/main.yml | 3 + .../roles/test_cs_project/tasks/main.yml | 100 ++++++++++++++++ .../test_cs_vmsnapshot/defaults/main.yml | 3 + .../roles/test_cs_vmsnapshot/meta/main.yml | 3 + .../roles/test_cs_vmsnapshot/tasks/main.yml | 101 ++++++++++++++++ 10 files changed, 404 insertions(+), 1 deletion(-) create mode 100644 test/integration/roles/test_cs_domain/meta/main.yml create mode 100644 test/integration/roles/test_cs_domain/tasks/main.yml create mode 100644 test/integration/roles/test_cs_iso/meta/main.yml create mode 100644 test/integration/roles/test_cs_iso/tasks/main.yml create mode 100644 test/integration/roles/test_cs_project/meta/main.yml create mode 100644 test/integration/roles/test_cs_project/tasks/main.yml create mode 100644 test/integration/roles/test_cs_vmsnapshot/defaults/main.yml create mode 100644 test/integration/roles/test_cs_vmsnapshot/meta/main.yml create mode 100644 test/integration/roles/test_cs_vmsnapshot/tasks/main.yml diff --git a/test/integration/cloudstack.yml b/test/integration/cloudstack.yml index 6951fd2856..486bd6e158 100644 --- a/test/integration/cloudstack.yml +++ b/test/integration/cloudstack.yml @@ -5,8 +5,12 @@ tags: - cloudstack vars: - cs_resource_prefix: "cs{{ resource_prefix | default('') }}" + cs_resource_prefix: "{{ resource_prefix | default('cs-') }}" roles: + - { role: test_cs_project, tags: test_cs_project } + - { role: test_cs_iso, tags: test_cs_iso } + - { role: test_cs_domain, tags: test_cs_domain } + - { role: test_cs_vmsnapshot, tags: test_cs_vmsnapshot } - { role: test_cs_sshkeypair, tags: test_cs_sshkeypair } - { role: test_cs_affinitygroup, tags: test_cs_affinitygroup } - { role: test_cs_securitygroup, tags: test_cs_securitygroup } diff --git a/test/integration/roles/test_cs_domain/meta/main.yml b/test/integration/roles/test_cs_domain/meta/main.yml new file mode 100644 index 0000000000..03e38bd4f7 --- /dev/null +++ b/test/integration/roles/test_cs_domain/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - test_cs_common diff --git a/test/integration/roles/test_cs_domain/tasks/main.yml b/test/integration/roles/test_cs_domain/tasks/main.yml new file mode 100644 index 0000000000..697a62f764 --- /dev/null +++ b/test/integration/roles/test_cs_domain/tasks/main.yml @@ -0,0 +1,112 @@ +--- +- name: setup + cs_domain: path={{ cs_resource_prefix }}_domain state=absent + register: dom +- name: verify setup + assert: + that: + - dom|success + +- name: test fail if missing name + action: cs_domain + register: dom + ignore_errors: true +- name: verify results of fail if missing params + assert: + that: + - dom|failed + - 'dom.msg == "missing required arguments: path"' + +- name: test fail if ends with / + cs_domain: path={{ cs_resource_prefix }}_domain/ + register: dom + ignore_errors: true +- name: verify results of fail if ends with / + assert: + that: + - dom|failed + - dom.msg == "Path '{{ cs_resource_prefix }}_domain/' must not end with /" + +- name: test create a domain + cs_domain: path={{ cs_resource_prefix }}_domain + register: dom +- name: verify results of test create a domain + assert: + that: + - dom|changed + - dom.path == "ROOT/{{ cs_resource_prefix }}_domain" + - dom.name == "{{ cs_resource_prefix }}_domain" + +- name: test create a domain idempotence + cs_domain: path={{ cs_resource_prefix }}_domain + register: dom +- name: verify results of test create a domain idempotence + assert: + that: + - not dom|changed + - dom.path == "ROOT/{{ cs_resource_prefix }}_domain" + - dom.name == "{{ cs_resource_prefix }}_domain" + +- name: test create a subdomain + cs_domain: path=ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain + register: dom +- name: verify results of test create a domain + assert: + that: + - dom|changed + - dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain" + - dom.name == "{{ cs_resource_prefix }}_subdomain" + +- name: test create a subdomain idempotence + cs_domain: path=ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain + register: dom +- name: verify results of test create a subdomain idempotence + assert: + that: + - not dom|changed + +- name: test delete a subdomain + cs_domain: path=ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain state=absent + register: dom +- name: verify results of test delete a subdomain idempotence + assert: + that: + - dom|changed + - dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain" + - dom.name == "{{ cs_resource_prefix }}_subdomain" + +- name: test delete a subdomain idempotence + cs_domain: path=ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain state=absent + register: dom +- name: verify results of test delete a subdomain idempotence + assert: + that: + - not dom|changed + +- name: test create a subdomain 2 + cs_domain: path=ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain + register: dom +- name: verify results of test create a subdomain 2 + assert: + that: + - dom|changed + - dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain" + - dom.name == "{{ cs_resource_prefix }}_subdomain" + +- name: test delete a domain with clean up + cs_domain: path=ROOT/{{ cs_resource_prefix }}_domain state=absent clean_up=true + register: dom +- name: verify results of test delete a domain with clean up + assert: + that: + - dom|changed + - dom.path == "ROOT/{{ cs_resource_prefix }}_domain" + - dom.name == "{{ cs_resource_prefix }}_domain" + +- name: test delete a domain with clean up idempotence + cs_domain: path=ROOT/{{ cs_resource_prefix }}_domain state=absent clean_up=true + register: dom +- name: verify results of test delete a domain with clean up idempotence + assert: + that: + - not dom|changed diff --git a/test/integration/roles/test_cs_iso/meta/main.yml b/test/integration/roles/test_cs_iso/meta/main.yml new file mode 100644 index 0000000000..03e38bd4f7 --- /dev/null +++ b/test/integration/roles/test_cs_iso/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - test_cs_common diff --git a/test/integration/roles/test_cs_iso/tasks/main.yml b/test/integration/roles/test_cs_iso/tasks/main.yml new file mode 100644 index 0000000000..d554316f52 --- /dev/null +++ b/test/integration/roles/test_cs_iso/tasks/main.yml @@ -0,0 +1,71 @@ +--- +- name: ensure iso is deleted + cs_iso: + name: "{{ cs_resource_prefix }}-iso" + state: absent + register: iso +- name: verify ensure iso is deleted + assert: + that: + - iso|success + +- name: test download iso + cs_iso: + name: "{{ cs_resource_prefix }}-iso" + url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso + os_type: Debian GNU/Linux 7(64-bit) + register: iso +- name: verify test download iso + assert: + that: + - iso|changed + - iso.name == "{{ cs_resource_prefix }}-iso" + +- name: test download iso idempotence + cs_iso: + name: "{{ cs_resource_prefix }}-iso" + url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso + os_type: Debian GNU/Linux 7(64-bit) + register: iso +- name: verify test download iso idempotence + assert: + that: + - not iso|changed + - iso.name == "{{ cs_resource_prefix }}-iso" + +# TODO: on 4.6 simulator no checksum was returned +# TODO: check if this is a bug in 4.6 +#- name: test download iso idempotence by checksum +# cs_iso: +# name: "{{ cs_resource_prefix }}-iso2" +# checksum: "{{ iso.checksum }}" +# url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso +# os_type: Debian GNU/Linux 7(64-bit) +# register: iso2 +#- name: verify test download iso idempotence by checksum +# assert: +# that: +# - not iso2|changed +# - iso2.name == "{{ cs_resource_prefix }}-iso" +# - iso2.checksum == iso.checksum + +- name: test remove iso + cs_iso: + name: "{{ cs_resource_prefix }}-iso" + state: absent + register: iso +- name: verify test remove iso + assert: + that: + - iso|changed + - iso.name == "{{ cs_resource_prefix }}-iso" + +- name: test remove iso idempotence + cs_iso: + name: "{{ cs_resource_prefix }}-iso" + state: absent + register: iso +- name: verify test remove iso idempotence + assert: + that: + - not iso|changed diff --git a/test/integration/roles/test_cs_project/meta/main.yml b/test/integration/roles/test_cs_project/meta/main.yml new file mode 100644 index 0000000000..03e38bd4f7 --- /dev/null +++ b/test/integration/roles/test_cs_project/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - test_cs_common diff --git a/test/integration/roles/test_cs_project/tasks/main.yml b/test/integration/roles/test_cs_project/tasks/main.yml new file mode 100644 index 0000000000..0e2e2c1624 --- /dev/null +++ b/test/integration/roles/test_cs_project/tasks/main.yml @@ -0,0 +1,100 @@ +--- +- name: ensure project does not exist + cs_project: + name: "{{ cs_resource_prefix }}-prj" + state: absent + register: prj +- name: verify project did not exist + assert: + that: + - prj|success + +- name: test create project + cs_project: + name: "{{ cs_resource_prefix }}-prj" + register: prj +- name: verify test create project + assert: + that: + - prj|changed + - prj.name == "{{ cs_resource_prefix }}-prj" + +- name: test create project idempotence + cs_project: + name: "{{ cs_resource_prefix }}-prj" + register: prj +- name: verify test create project idempotence + assert: + that: + - not prj|changed + - prj.name == "{{ cs_resource_prefix }}-prj" + +- name: test suspend project + cs_project: + name: "{{ cs_resource_prefix }}-prj" + state: suspended + register: prj +- name: verify test suspend project + assert: + that: + - prj|changed + - prj.name == "{{ cs_resource_prefix }}-prj" + - prj.state == "Suspended" + +- name: test suspend project idempotence + cs_project: + name: "{{ cs_resource_prefix }}-prj" + state: suspended + register: prj +- name: verify test suspend project idempotence + assert: + that: + - not prj|changed + - prj.name == "{{ cs_resource_prefix }}-prj" + - prj.state == "Suspended" + +- name: test activate project + cs_project: + name: "{{ cs_resource_prefix }}-prj" + state: active + register: prj +- name: verify test activate project + assert: + that: + - prj|changed + - prj.name == "{{ cs_resource_prefix }}-prj" + - prj.state == "Active" + +- name: test activate project idempotence + cs_project: + name: "{{ cs_resource_prefix }}-prj" + state: active + register: prj +- name: verify test activate project idempotence + assert: + that: + - not prj|changed + - prj.name == "{{ cs_resource_prefix }}-prj" + - prj.state == "Active" + +- name: test delete project + cs_project: + name: "{{ cs_resource_prefix }}-prj" + state: absent + register: prj +- name: verify test delete project + assert: + that: + - prj|changed + - prj.name == "{{ cs_resource_prefix }}-prj" + - prj.state == "Active" + +- name: test delete project idempotence + cs_project: + name: "{{ cs_resource_prefix }}-prj" + state: absent + register: prj +- name: verify test delete project idempotence + assert: + that: + - not prj|changed diff --git a/test/integration/roles/test_cs_vmsnapshot/defaults/main.yml b/test/integration/roles/test_cs_vmsnapshot/defaults/main.yml new file mode 100644 index 0000000000..e393e60f4f --- /dev/null +++ b/test/integration/roles/test_cs_vmsnapshot/defaults/main.yml @@ -0,0 +1,3 @@ +--- +test_cs_instance_template: CentOS 5.3(64-bit) no GUI (Simulator) +test_cs_instance_offering_1: Small Instance diff --git a/test/integration/roles/test_cs_vmsnapshot/meta/main.yml b/test/integration/roles/test_cs_vmsnapshot/meta/main.yml new file mode 100644 index 0000000000..03e38bd4f7 --- /dev/null +++ b/test/integration/roles/test_cs_vmsnapshot/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - test_cs_common diff --git a/test/integration/roles/test_cs_vmsnapshot/tasks/main.yml b/test/integration/roles/test_cs_vmsnapshot/tasks/main.yml new file mode 100644 index 0000000000..5d80bf0214 --- /dev/null +++ b/test/integration/roles/test_cs_vmsnapshot/tasks/main.yml @@ -0,0 +1,101 @@ +--- +- name: setup instance + cs_instance: + name: "{{ cs_resource_prefix }}-vm-snapshot" + template: "{{ test_cs_instance_template }}" + service_offering: "{{ test_cs_instance_offering_1 }}" + register: instance +- name: verify create instance + assert: + that: + - instance|success + +- name: ensure no snapshot exists + cs_vmsnapshot: + name: "{{ cs_resource_prefix }}_snapshot" + vm: "{{ cs_resource_prefix }}-vm-snapshot" + state: absent + register: snap +- name: verify setup + assert: + that: + - snap|success + +- name: test fail if missing name + action: cs_vmsnapshot + register: snap + ignore_errors: true +- name: verify results of fail if missing params + assert: + that: + - snap|failed + - 'snap.msg == "missing required arguments: vm,name"' + +- name: test create snapshot + cs_vmsnapshot: + name: "{{ cs_resource_prefix }}_snapshot" + vm: "{{ cs_resource_prefix }}-vm-snapshot" + snapshot_memory: yes + register: snap +- name: verify test create snapshot + assert: + that: + - snap|changed + - snap.display_name == "{{ cs_resource_prefix }}_snapshot" + +- name: test create snapshot idempotence + cs_vmsnapshot: + name: "{{ cs_resource_prefix }}_snapshot" + vm: "{{ cs_resource_prefix }}-vm-snapshot" + snapshot_memory: yes + register: snap +- name: verify test create snapshot idempotence + assert: + that: + - not snap|changed + - snap.display_name == "{{ cs_resource_prefix }}_snapshot" + +- name: test revert snapshot + cs_vmsnapshot: + name: "{{ cs_resource_prefix }}_snapshot" + vm: "{{ cs_resource_prefix }}-vm-snapshot" + state: revert + register: snap +- name: verify test revert snapshot + assert: + that: + - snap|changed + - snap.display_name == "{{ cs_resource_prefix }}_snapshot" + +- name: test remove snapshot + cs_vmsnapshot: + name: "{{ cs_resource_prefix }}_snapshot" + vm: "{{ cs_resource_prefix }}-vm-snapshot" + state: absent + register: snap +- name: verify test remove snapshot + assert: + that: + - snap|changed + - snap.display_name == "{{ cs_resource_prefix }}_snapshot" + +- name: test remove snapshot idempotence + cs_vmsnapshot: + name: "{{ cs_resource_prefix }}_snapshot" + vm: "{{ cs_resource_prefix }}-vm-snapshot" + state: absent + register: snap +- name: verify test remove snapshot idempotence + assert: + that: + - not snap|changed + +- name: cleanup instance + cs_instance: + name: "{{ cs_resource_prefix }}-vm-snapshot" + state: expunged + register: instance +- name: verify destroy instance + assert: + that: + - instance|success From eb44f85dc8e18b1af43870c7eb33c8e61fe0619e Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Sun, 23 Aug 2015 22:49:45 +0200 Subject: [PATCH 2/3] cloudstack: test_cs_instance: make it more configurable --- .../roles/test_cs_instance/defaults/main.yml | 3 ++ .../roles/test_cs_instance/tasks/main.yml | 5 --- .../roles/test_cs_instance/tasks/present.yml | 32 +++++++++---------- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/test/integration/roles/test_cs_instance/defaults/main.yml b/test/integration/roles/test_cs_instance/defaults/main.yml index 585947ab43..bb2f5c9d82 100644 --- a/test/integration/roles/test_cs_instance/defaults/main.yml +++ b/test/integration/roles/test_cs_instance/defaults/main.yml @@ -1,2 +1,5 @@ --- instance_number: 1 +test_cs_instance_template: CentOS 5.3(64-bit) no GUI (Simulator) +test_cs_instance_offering_1: Small Instance +test_cs_instance_offering_2: Medium Instance diff --git a/test/integration/roles/test_cs_instance/tasks/main.yml b/test/integration/roles/test_cs_instance/tasks/main.yml index 479ea01c15..a457a3c710 100644 --- a/test/integration/roles/test_cs_instance/tasks/main.yml +++ b/test/integration/roles/test_cs_instance/tasks/main.yml @@ -1,11 +1,6 @@ --- - include: setup.yml - tags: any - include: present.yml - tags: test_cs_instance_present #- include: tags.yml -# tags: test_cs_instance_tags - include: absent.yml - tags: test_cs_instance_absent - include: cleanup.yml - tags: test_cs_instance_cleanup diff --git a/test/integration/roles/test_cs_instance/tasks/present.yml b/test/integration/roles/test_cs_instance/tasks/present.yml index 4337f0acf4..10242a57fd 100644 --- a/test/integration/roles/test_cs_instance/tasks/present.yml +++ b/test/integration/roles/test_cs_instance/tasks/present.yml @@ -2,8 +2,8 @@ - name: test create instance cs_instance: name: "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - template: Linux Debian 7 64-bit - service_offering: Tiny + template: "{{ test_cs_instance_template }}" + service_offering: "{{ test_cs_instance_offering_1 }}" affinity_group: "{{ cs_resource_prefix }}-ag" security_group: "{{ cs_resource_prefix }}-sg" ssh_key: "{{ cs_resource_prefix }}-sshkey" @@ -16,7 +16,7 @@ - instance|changed - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - - instance.service_offering == "Tiny" + - instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.state == "Running" - instance.ssh_key == "{{ cs_resource_prefix }}-sshkey" - not instance.tags @@ -25,8 +25,8 @@ - name: test create instance idempotence cs_instance: name: "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - template: Linux Debian 7 64-bit - service_offering: Tiny + template: "{{ test_cs_instance_template }}" + service_offering: "{{ test_cs_instance_offering_1 }}" affinity_group: "{{ cs_resource_prefix }}-ag" security_group: "{{ cs_resource_prefix }}-sg" ssh_key: "{{ cs_resource_prefix }}-sshkey" @@ -39,7 +39,7 @@ - not instance|changed - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - - instance.service_offering == "Tiny" + - instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.state == "Running" - instance.ssh_key == "{{ cs_resource_prefix }}-sshkey" - not instance.tags @@ -48,7 +48,7 @@ - name: test running instance not updated cs_instance: name: "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - service_offering: Micro + service_offering: "{{ test_cs_instance_offering_2 }}" register: instance - name: verify running instance not updated assert: @@ -57,7 +57,7 @@ - not instance|changed - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - - instance.service_offering == "Tiny" + - instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.state == "Running" @@ -73,7 +73,7 @@ - instance|changed - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - - instance.service_offering == "Tiny" + - instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.state == "Stopped" @@ -94,7 +94,7 @@ cs_instance: name: "{{ cs_resource_prefix }}-vm-{{ instance_number }}" display_name: "{{ cs_resource_prefix }}-display-{{ instance_number }}" - service_offering: Micro + service_offering: "{{ test_cs_instance_offering_2 }}" register: instance - name: verify updating stopped instance assert: @@ -103,7 +103,7 @@ - instance|changed - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - - instance.service_offering == "Micro" + - instance.service_offering == "{{ test_cs_instance_offering_2 }}" - instance.state == "Stopped" @@ -119,7 +119,7 @@ - instance|changed - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-display-{{ instance_number }}" - - instance.service_offering == "Micro" + - instance.service_offering == "{{ test_cs_instance_offering_2 }}" - instance.state == "Running" @@ -138,7 +138,7 @@ - name: test force update running instance cs_instance: name: "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - service_offering: Tiny + service_offering: "{{ test_cs_instance_offering_1 }}" force: true register: instance - name: verify force update running instance @@ -148,13 +148,13 @@ - instance|changed - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - - instance.service_offering == "Tiny" + - instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.state == "Running" - name: test force update running instance idempotence cs_instance: name: "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - service_offering: Tiny + service_offering: "{{ test_cs_instance_offering_1 }}" force: true register: instance - name: verify force update running instance idempotence @@ -164,5 +164,5 @@ - not instance|changed - instance.name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - instance.display_name == "{{ cs_resource_prefix }}-vm-{{ instance_number }}" - - instance.service_offering == "Tiny" + - instance.service_offering == "{{ test_cs_instance_offering_1 }}" - instance.state == "Running" From 69d5e6208367fc50fc9005a92674ea59b46f7bc8 Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Sun, 23 Aug 2015 22:50:23 +0200 Subject: [PATCH 3/3] cloudstack: test_cs_account: account_state was renamed, fixes tests --- .../roles/test_cs_account/tasks/main.yml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/test/integration/roles/test_cs_account/tasks/main.yml b/test/integration/roles/test_cs_account/tasks/main.yml index 5bcea07ef2..af7a54f52b 100644 --- a/test/integration/roles/test_cs_account/tasks/main.yml +++ b/test/integration/roles/test_cs_account/tasks/main.yml @@ -46,7 +46,7 @@ - acc.name == "{{ cs_resource_prefix }}_user" - acc.network_domain == "{{ cs_resource_prefix }}.local" - acc.account_type == "user" - - acc.account_state == "enabled" + - acc.state == "enabled" - acc.domain == "ROOT" - name: test create user account idempotence @@ -67,7 +67,7 @@ - acc.name == "{{ cs_resource_prefix }}_user" - acc.network_domain == "{{ cs_resource_prefix }}.local" - acc.account_type == "user" - - acc.account_state == "enabled" + - acc.state == "enabled" - acc.domain == "ROOT" - name: test lock user account @@ -83,7 +83,7 @@ - acc.name == "{{ cs_resource_prefix }}_user" - acc.network_domain == "{{ cs_resource_prefix }}.local" - acc.account_type == "user" - - acc.account_state == "locked" + - acc.state == "locked" - acc.domain == "ROOT" - name: test lock user account idempotence @@ -99,7 +99,7 @@ - acc.name == "{{ cs_resource_prefix }}_user" - acc.network_domain == "{{ cs_resource_prefix }}.local" - acc.account_type == "user" - - acc.account_state == "locked" + - acc.state == "locked" - acc.domain == "ROOT" - name: test disable user account @@ -115,7 +115,7 @@ - acc.name == "{{ cs_resource_prefix }}_user" - acc.network_domain == "{{ cs_resource_prefix }}.local" - acc.account_type == "user" - - acc.account_state == "disabled" + - acc.state == "disabled" - acc.domain == "ROOT" - name: test disable user account idempotence @@ -131,7 +131,7 @@ - acc.name == "{{ cs_resource_prefix }}_user" - acc.network_domain == "{{ cs_resource_prefix }}.local" - acc.account_type == "user" - - acc.account_state == "disabled" + - acc.state == "disabled" - acc.domain == "ROOT" - name: test lock disabled user account @@ -147,7 +147,7 @@ - acc.name == "{{ cs_resource_prefix }}_user" - acc.network_domain == "{{ cs_resource_prefix }}.local" - acc.account_type == "user" - - acc.account_state == "locked" + - acc.state == "locked" - acc.domain == "ROOT" - name: test lock disabled user account idempotence @@ -163,7 +163,7 @@ - acc.name == "{{ cs_resource_prefix }}_user" - acc.network_domain == "{{ cs_resource_prefix }}.local" - acc.account_type == "user" - - acc.account_state == "locked" + - acc.state == "locked" - acc.domain == "ROOT" - name: test enable user account @@ -179,7 +179,7 @@ - acc.name == "{{ cs_resource_prefix }}_user" - acc.network_domain == "{{ cs_resource_prefix }}.local" - acc.account_type == "user" - - acc.account_state == "enabled" + - acc.state == "enabled" - acc.domain == "ROOT" - name: test enable user account idempotence @@ -195,7 +195,7 @@ - acc.name == "{{ cs_resource_prefix }}_user" - acc.network_domain == "{{ cs_resource_prefix }}.local" - acc.account_type == "user" - - acc.account_state == "enabled" + - acc.state == "enabled" - acc.domain == "ROOT" - name: test remove user account @@ -211,7 +211,7 @@ - acc.name == "{{ cs_resource_prefix }}_user" - acc.network_domain == "{{ cs_resource_prefix }}.local" - acc.account_type == "user" - - acc.account_state == "enabled" + - acc.state == "enabled" - acc.domain == "ROOT" - name: test remove user account idempotence