Hallo Team,
Referring the below closed topic
VCenter appliance root password expiration set module name & playbook issue
I found that there is no module. Check my output here
cd /usr/lib/python3.9/site-packages/ansible_collections/community/vmware/plugins/modules
ls -l vcenter_*
-rw-r--r--. 1 root root 6433 Nov 8 2023 vcenter_domain_user_group_info.py
-rw-r--r--. 1 root root 3397 Nov 8 2023 vcenter_extension_info.py
-rw-r--r--. 1 root root 7219 Nov 8 2023 vcenter_extension.py
-rw-r--r--. 1 root root 16819 Nov 8 2023 vcenter_folder.py
-rw-r--r--. 1 root root 9710 Nov 8 2023 vcenter_license.py
-rw-r--r--. 1 root root 32248 Nov 8 2023 vcenter_standard_key_provider.py
There is no file with name vcenter_root_password_expiration
Looks like this file was left out somewhere.
Reference playbook
---
- name: Change vCenter Root Password expiry
hosts: localhost
gather_facts: false
vars_files:
- vcenter_vars.yaml
tasks:
- name: Change the vCenter password expiry
community.vmware.vcenter_root_password_expiration:
hostname: "{{ vc_name }}"
username: "{{ vc_usr_name }}"
password: "{{ vc_passwd }}"
validate_certs: "{{ vc_vali_certs }}"
max_days_between_password_change: 365
min_days_between_password_change: 3
warn_days_before_password_expiration: 7
email: ansible@zonkos.ict
state: present
delegate_to: localhost
ββ[$] <> ansible-playbook playbook.yaml --check
[WARNING]: Unable to parse /root/vc_passwd/inventory/vcenters.ini as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
ERROR! couldn't resolve module/action 'community.vmware.vcenter_root_password_expiration'. This often indicates a misspelling, missing collection, or incorrect module path.
The error appears to be in '/root/vc_passwd/playbook.yaml': line 10, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
tasks:
- name: Change the vCenter password expiry
^ here
You have new mail.
ββ[root@hatchery] - [~/vc_passwd] - [Wed May 15, 14:47]
ββ[$] <>