diff --git a/tests/integration/targets/vcenter_root_password_expiration/aliases b/tests/integration/targets/vcenter_root_password_expiration/aliases new file mode 100644 index 000000000..b1682114e --- /dev/null +++ b/tests/integration/targets/vcenter_root_password_expiration/aliases @@ -0,0 +1,3 @@ +cloud/vcenter +needs/target/prepare_vmware_tests +zuul/vmware/vcenter_only diff --git a/tests/integration/targets/vcenter_root_password_expiration/tasks/main.yml b/tests/integration/targets/vcenter_root_password_expiration/tasks/main.yml new file mode 100644 index 000000000..e80baf9c9 --- /dev/null +++ b/tests/integration/targets/vcenter_root_password_expiration/tasks/main.yml @@ -0,0 +1,23 @@ +# Test code for the vcenter_root_password_expiration module. +# Copyright: (c) 2023, Mario Lenz +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +- import_role: + name: prepare_vmware_tests + +- name: Set vCenter root password expiration + vcenter_root_password_expiration: + hostname: "{{ vcenter_hostname }}" + username: "{{ vcenter_username }}" + password: "{{ vcenter_password }}" + state: present + email: "vCenter-Admin@community.vmware.example" + max_days_between_password_change: 93 + min_days_between_password_change: 7 + warn_days_before_password_expiration: 22 + validate_certs: false + register: pw_expiration + +- assert: + that: + - pw_expiration is changed