Ansible: Shutdown ESXi Host

By | 28/12/2022

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 }}'

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir