Last active
March 6, 2022 16:53
-
-
Save ngschmidt/ea4caf3e676d572719eb9e2a3fb152d1 to your computer and use it in GitHub Desktop.
VMware NSX-T Ansible Segment Creation Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
tasks: | |
- name: "Creating segment {{ segment_name }}!" | |
vmware.ansible_for_nsxt.nsxt_policy_segment: | |
hostname: "{{ nsx_manager }}" | |
username: '{{ lookup("env", "APIUSER") }}' | |
password: '{{ lookup("env", "APIPASS") }}' | |
validate_certs: False | |
state: present | |
display_name: "{{ segment_name }}" | |
transport_zone_display_name: "{{ segment_tz }}" | |
replication_mode: "SOURCE" | |
admin_state: UP | |
connectivity_path: "/infra/tier-1s/{{ tier_1 }}" | |
subnets: | |
- gateway_address: "{{ ipv4 }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
nsx_manager: "nsx.engyak.co" | |
segment_name: "example_segment_name" | |
segment_tz: "overlay-tz" | |
tier_1: "tier1" | |
ipv4: "10.100.100.100/24" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
nsx_manager: "nsx.engyak.co" | |
segment_name: "example_segment_name" | |
segment_tz: "overlay-tz" | |
tier_1: "tier1" | |
ipv4: "10.100.100.99/24" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment