Ansible: Shutdown ESXi Host

ESXi hostu ansible ile shutdown yapmak icin asagidaki playbooku kullanabilirsiniz.

 

---
- name: Vmware Esxi Host Configuration
  hosts: '{{ esxi_hostname }}'
  connection: local
  gather_facts: no
  tasks:
  - name: Set the state of a host system to shutdown
    community.vmware.vmware_host_powerstate:
      validate_certs: False
      hostname: '{{ vcenter_hostname }}'
      username: '{{ vcenter_username }}'
      password: '{{ vcenter_password }}'
      esxi_hostname: '{{ esxi_hostname }}'
      state: shutdown-host
    register: shutdown_esxi_host
    delegate_to: '{{ delegate_server }}'

Join the ConversationLeave a reply

Your email address will not be published. Required fields are marked *

Comment*

Name*

Website