Last active
May 29, 2019 20:49
-
-
Save laidbackware/fd01b5addcce0552aee3f6552ad5fcc4 to your computer and use it in GitHub Desktop.
nsxt_tutorials_1_playbook
This file contains hidden or 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: 127.0.0.1 | |
connection: local | |
tasks: | |
- name: Create a new IP Set | |
nsxt_ip_sets: | |
hostname: "{{ hostname }}" | |
username: "{{ username }}" | |
password: "{{ password }}" | |
validate_certs: "{{ validate_certs }}" | |
display_name: "{{ item.display_name }}" | |
ip_addresses: "{{ item.ip_addresses }}" | |
state: "{{ item.tags | default('present') }}" | |
with_items: | |
- "{{ nsxt_ip_sets }}" | |
- name: Create DFW Section with Rules | |
nsxt_firewall_section_with_rules: | |
hostname: "{{ hostname }}" | |
username: "{{ username }}" | |
password: "{{ password }}" | |
validate_certs: "{{ validate_certs }}" | |
display_name: "{{ item.display_name }}" | |
rules: "{{ item.rules | default([]) }}" | |
state: "{{ item.tags | default('present') }}" | |
stateful: "{{ item.stateful | default(True) }}" | |
with_items: | |
- "{{ nsxt_firewall_section }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment