add esxi to vcenter

[root@localhost ~]# cat addvsphere.yml
---
- name: add esxi
  hosts: localhost
  connection: local
  gather_facts: no
  tasks:
  - name: add ESXi Host to VCSA
    vmware_host:
        hostname: 192.168.0.107
        username: root
        password: vmware
        validate_certs: no
        datacenter_name: dc
        cluster_name: cluster
        esxi_hostname: 192.168.0.108
        esxi_username: root
        esxi_password: vgskiran
        state: present

[root@localhost ~]#

[root@localhost ~]# ansible-playbook addvsphere.yml 
 [WARNING]: Could not match supplied host pattern, ignoring: all

 [WARNING]: provided hosts list is empty, only localhost is available


PLAY [add esxi] ***********************************************************************

TASK [add ESXi Host to VCSA] **********************************************************
changed: [localhost]

PLAY RECAP ****************************************************************************
localhost                  : ok=1    changed=1    unreachable=0    failed=0   


Comments

Popular posts from this blog

ansible redhat cluster qorum qdevice

PE 3.9.0 on centos 6

gfs2 cluster