-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.yaml
30 lines (26 loc) · 929 Bytes
/
setup.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
- name: setup esxi
hosts: esxi
# gather_facts: false
remote_user: root
tasks:
- name: enable cdp
raw: esxcli network vswitch standard set --cdp-status=both -v vSwitch0
- name: generate ssl certificates
raw: generate-certificates
- name: set hostname
raw: "esxcli system hostname set --fqdn={{ ansible_hostname }}"
- name: setup NFS mounts
raw: "esxcli storage nfs add --host={{ item.host }} -r --share={{ item.path }} -v {{ item.name }}"
with_items: nfs_mount_points
# - name: set dhcp hostname
# - template: src=dhclient-vmk0.conf.j2 dest=/etc/dhclient-vmk0.conf
#
# - name: Generate certification
# raw: /bin/generate-certificates
#
# - name: Enable vSphere MOB
# raw: vim-cmd hostsvc/advopt/update Config.HostAgent.plugins.solo.enableMob bool true
#
# - name: Set DNS
# raw: esxcli network ip dns server add -s {{ name_server }}