Saturday, June 5, 2021
use windows facts in ansible
Friday, June 4, 2021
To enable kerberos authentication for ansible.
Configure VMware.PowerCLI on powershell
Install-Module -Name VMware.PowerCLI
Set-PowerCLIConfiguration -Scope User -InvalidCertificateAction warn
To enable virtualization support on VM
To enable virtualization support on VM
add below mentioned line in vm vmx file
vhv.enable = "TRUE"
####################################
evcCompatibilityMode = "FALSE"
monitor.phys_bits_used = "40"
vmotion.checkpointFBSize = "4194304"
cleanShutdown = "TRUE"
softPowerOff = "FALSE"
tools.syncTime = "FALSE"
vhv.enable = "TRUE"
ide1:0.startConnected = "FALSE"
ide1:0.allowGuestConnectionControl = "TRUE"
config.readOnly = "FALSE"
ethernet0.virtualDev = "vmxnet3"
ethernet0.networkName = "VM Network"
ethernet0.addressType = "generated"
ethernet0.uptCompatibility = "TRUE"
ethernet0.present = "TRUE"
ethernet0.pciSlotNumber = "160"
ethernet0.generatedAddress = "00:0c:29:de:59:84"
ethernet0.generatedAddressOffset = "0"
ethernet1.pciSlotNumber = "192"
ethernet1.virtualDev = "vmxnet3"
ethernet1.networkName = "VM Network"
ethernet1.addressType = "generated"
ethernet1.uptCompatibility = "true"
ethernet1.present = "TRUE"
ethernet1.generatedAddress = "00:0c:29:de:59:8e"
ethernet1.generatedAddressOffset = "10"
extendedConfigFile = "ESXi6.7.vmxf"
vhv.enable = "TRUE"
Ansible Playbook to create or remove windows directory
To enable Sudo access on particular without password.
edit visudo file on ubuntu and centos
add this line to get sudo access on ansible account without password
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
ansible ALL=(ALL) NOPASSWD: ALL
now for sudo access need to run command with -b
ansible node -b -a "reboot"
ansible node* -m setup to check node info