Skip to content

Instantly share code, notes, and snippets.

@MatthewJDavis
Created June 7, 2020 16:53
Show Gist options
  • Select an option

  • Save MatthewJDavis/7f2c440f17738cadf09ccf07726191fc to your computer and use it in GitHub Desktop.

Select an option

Save MatthewJDavis/7f2c440f17738cadf09ccf07726191fc to your computer and use it in GitHub Desktop.
Azure nsg with public ip address of network
---
- name: Create security group that allows SSH
azure_rm_securitygroup:
resource_group: "{{ rg_name }}"
name: "{{ nsg_name }}"
rules:
- name: SSH
protocol: Tcp
destination_port_range: 22
access: Allow
priority: 101
direction: Inbound
source_address_prefix: "{{ public_ip.json.ip }}/32"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment