In this post, I am going to cover the running of the Ansible NSX-T playbook so that you can get NSX-T deployed in your environment(s). In case you missed them, in my previous posts, I detailed how to set up your Ansible environment and configure the playbook in preparation for deploying NSX-T.
If you arrived here and want to figure it out for yourself, you can download my playbooks here.
Playbook Overview
The main playbook that you will need to run is called ‘nsxt_create_environment.yml‘, which is located in the root of the Ansible-NSXT folder.
--- ## Deploys an NSX-T environment - hosts: nsxt_managers_controllers connection: local become: yes gather_facts: False vars: nsxt_deployment_vcenter: "{{ mgmt_vcenter_server }}" nsxt_deployment_vcenter_username: "{{ mgmt_vcenter_admin_username }}" nsxt_deployment_vcenter_password: "{{ mgmt_vcenter_admin_password }}" nsxt_deployment_datacenter: "{{ mgmt_vcenter_datacenter }}" nsxt_deployment_cluster: "{{ mgmt_vcenter_cluster }}" nsxt_deployment_datastore: "{{ nsxt_datastore }}" nsxt_deployment_portgroup: "{{ nsxt_portgroup }}" nsxt_deployment_size: "{{ nsxt_default_deployment_size }}" nsxt_role: "{{ nsxt_default_role }}" compute_managers: - name: "{{ nsxt_compute_manager_name }}" host: "{{ nsxt_compute_manager_host }}" transport_clusters: "{{ nsxt_transport_clusters }}" ip_pools: - display_name: "{{ nsxt_transport_switch_ip_pool_name }}" subnets: - allocation_ranges: - start: "{{ nsxt_transport_switch_ip_pool_start }}" end: "{{ nsxt_transport_switch_ip_pool_end }}" cidr: "{{ nsxt_transport_switch_ip_pool_cidr }}" transport_zones: - display_name: "{{ nsxt_transport_zone_name }}" description: "{{ nsxt_transport_zone_desc }}" transport_type: "OVERLAY" transport_switch_name: "{{ nsxt_transport_switch_name }}" uplink_profiles: - display_name: "{{ nsxt_transport_switch_uplink_profile_name }}" teaming: active_list: - uplink_name: "{{ nsxt_transport_switch_uplink_1 }}" uplink_type: PNIC - uplink_name: "{{ nsxt_transport_switch_uplink_2 }}" uplink_type: PNIC policy: "{{ nsxt_transport_switch_uplink_profile_policy }}" transport_vlan: "{{ nsxt_transport_switch_uplink_profile_vlan }}" transport_node_profiles: - display_name: "{{ nsxt_transport_node_profile_name }}" description: "{{ nsxt_transport_switch_profile_desc }}" host_switches: - host_switch_profiles: - name: "{{ nsxt_transport_switch_uplink_profile_name }}" type: UplinkHostSwitchProfile host_switch_name: "{{ nsxt_transport_switch_name }}" pnics: - device_name: "{{ nsxt_transport_switch_pnic_1 }}" uplink_name: "{{ nsxt_transport_switch_uplink_1 }}" - device_name: "{{ nsxt_transport_switch_pnic_2 }}" uplink_name: "{{ nsxt_transport_switch_uplink_2 }}" ip_assignment_spec: resource_type: StaticIpPoolSpec ip_pool_name: "{{ nsxt_transport_switch_ip_pool_name }}" transport_zone_endpoints: - transport_zone_name: "{{ nsxt_transport_zone_name }}" roles: - nsxt_deploy_ova - nsxt_apply_license - nsxt_add_compute_managers - nsxt_create_ip_pools - nsxt_create_transport_zones - nsxt_create_uplink_profiles - nsxt_create_transport_profiles - nsxt_configure_transport_clusters
Read more “Deploying NSX-T Using Ansible – Part 3: Running The Playbook”