simplygeekuk.vmware_deploy_vcsa
vmware_deploy_vcsa
=========
This role helps you deploy the VMware vCenter Server Appliance (VCSA) using an OVA file.
Configuration options include:
- Set or change the root account's expiry date (or set it to never expire).
- Configure Syslog (for logging).
- Connect the appliance to an Active Directory (AD) domain and set up identity sources.
- Import CA Signed Certificates for secure connections.
- Adjust general settings and statistics for vCenter.
- Start and stop services as needed.
- Manage global permissions and user roles.
- Assign a vCenter License.
- Create Datacenters and Clusters, and configure high availability (HA), Distributed Resource Scheduler (DRS), and vSAN features.
- Add ESXi hosts and assign licenses.
Supported Versions
- VMware vCenter Server Appliance (VCSA) 6.5
- VMware vCenter Server Appliance (VCSA) 6.7
Requirements
- Python version should be 2.6 or higher.
- PyVmomi library is required.
Role Variables
Mandatory Parameters (in host_vars
):
Network Configuration
Define the network settings for the appliance:
network_ip_address: "x.x.x.x"
network_label: "VM Network"
network_prefix: "xx"
network_gateway: "x.x.x.x"
Credentials
Set the SSH admin username and password:
vcsa_admin_username: "root"
vcsa_admin_password: "VMwar3!!"
Set the SSO Administrator username and password:
vcsa_sso_username: "[email protected]"
vcsa_sso_password: "VMwar3!!"
Define Ansible connection variables:
ansible_user: "{{ vcsa_admin_username }}"
ansible_password: "{{ vcsa_admin_password }}"
ansible_host: "{{ network_ip_address }}"
Additional Mandatory Parameters (as extra vars or in group_vars
):
OVA Deployment Variables
Define variables for deployment:
ova_deployment_hostname: "vcenter/esxi hostname"
ova_deployment_username: "vcenter/esxi username"
ova_deployment_password: "vcenter/esxi password"
Specify the target datastore (note: datastore clusters aren't supported):
ova_deployment_datastore: "datastore"
For vCenter Server deployment, specify:
ova_deployment_datacenter: "vcenter datacenter"
ova_deployment_cluster: "vcenter cluster"
ova_deployment_folder: "vcenter folder" # Optional
OVA Configuration
Set the OVA file name and local path:
ova_file: "ova_file.ova"
ova_path: "/path/to/ova_file"
DNS Configuration
Define the DNS domain and servers:
dns_domain: "example.com"
dns_servers:
- "x.x.x.x"
- "x.x.x.x"
Optional Parameters (as extra vars or in group_vars
):
OVA Download URL
Specify the OVA file URL if using HTTP:
ova_url: "http[s]://example.com/ova"
Root Account Settings
Set root account expiration policies:
vcsa_root_expiration_disable: no
vcsa_root_expiration_days: 90
Import CA Certificates
To use CA signed certificates:
vcsa_use_signed_certificate: no
Ensure corresponding certificates are placed in files/certs
folder.
Active Directory Membership
Join the appliance to an AD domain:
vcsa_join_to_domain: no
When set to yes, configure:
vcsa_ad_dom_join_domain: "ad.domain.local"
vcsa_ad_dom_join_username: "[email protected]"
vcsa_ad_dom_join_password: "VMwar3!!"
vcsa_ad_dom_join_ou: "CN=Computers,DC=AD,DC=DOMAIN,DC=LOCAL" # Optional
Apply vCenter License
Set vCenter License key:
vcsa_license_key: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
Manage vCenter Services
Specify services to start and stop:
vcsa_services_to_start:
- updatemgr
- vsphere-ui
vcsa_services_to_stop:
- rbd
- imagebuilder
vCenter Permissions
Define global roles and groups:
vcsa_global_admin_groups:
- "vSphere-Gloabl-Admins"
vcsa_vcenter_admin_groups:
- "vSphere-Admins"
vcsa_vcenter_readonly_groups:
- "vSphere-ReadOnly"
vCenter Settings
Configure settings for database, runtime, user directories, mail servers, and logging:
vcsa_database_max_connections: 50
vcsa_normal_operations_timeout: 30
vcsa_logging_level: "info"
Inventory Configuration
Define datacenters, clusters, and ESXi hosts to be created:
vcsa_datacenters:
- DC1
- DC2
vcsa_clusters:
- name: "Cluster-01"
datacenter: "DC1"
enable_ha: yes
Additional Default Variables
Common variables include NTP servers and HTTP API settings:
ntp_servers:
- "0.pool.ntp.org"
- "1.pool.ntp.org"
Dependencies
- { role: simplygeekuk.vmware_deploy_ova, tags: [ 'deploy' ] }
Example Playbook
- hosts: vcsa_appliances
become: no
gather_facts: False
roles:
- simplygeekuk.vmware_deploy_vcsa
License
MIT
Author Information
Gavin Stephens (https://www.simplygeek.co.uk)
Deploy and configure the vCenter Server Appliance
ansible-galaxy install simplygeekuk.vmware_deploy_vcsa