Added this repo
This commit is contained in:
28
ansible/playbooks/vmware_tmp/vm_get_info.yml
Normal file
28
ansible/playbooks/vmware_tmp/vm_get_info.yml
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
- name: Get info VM
|
||||
hosts: localhost
|
||||
become: false
|
||||
gather_facts: false
|
||||
vars:
|
||||
vars_name: "dc01-ftpsrv01-it-infr.lab.loc"
|
||||
# vars_name: "debian12-common-templ"
|
||||
vars_files:
|
||||
- /root/.secret/.ansible/vars_creds.yml
|
||||
|
||||
tasks:
|
||||
- name: Get info VM
|
||||
community.vmware.vmware_vm_info:
|
||||
hostname: "{{ vcenter_hostname }}"
|
||||
username: "{{ vcenter_username }}"
|
||||
password: "{{ vcenter_password }}"
|
||||
validate_certs: "{{ vcenter_validate_certs }}"
|
||||
# datacenter: "{{ vcenter_datacenter }}"
|
||||
vm_name: "{{ vars_name }}"
|
||||
# vm_type: template
|
||||
delegate_to: localhost
|
||||
register: info_vm
|
||||
|
||||
|
||||
- name: Print info {{ vars_name }}
|
||||
debug:
|
||||
msg: "{{ info_vm }}"
|
Reference in New Issue
Block a user