jesperberth.az_virtualnetwork
Az_virtualnetwork
Creates a Virtual Network in Microsoft Azure with one subnet.
Requirements
You need the Azure SDK installed.
Run:
pip install 'ansible[azure]'
Role Variables
This role uses the following variables. The first four are required for both the az-resourcegroup role and this role:
resourcegroup
: The name of the resource group to create.location
: The Azure location for the resource group.tag_owner
: Tag to identify the owner, with a specified value.tag_project
: Tag to identify the project, with a specified value.virtualnetwork_name
: The name of the Virtual Network.cidr
: The IP range for the Virtual Network, e.g., 10.0.0.0/16.subnet_name
: The name of the subnet.subnet_cidr
: The IP range for the subnet, which must fit within thecidr
, e.g., 10.0.0.0/24.
The virtualnetwork_name
, cidr
, subnet_name
, and subnet_cidr
are set in vars/main.yml
but can be changed in the playbook.
Dependencies
You must run the command ansible-galaxy install jesperberth.az_resourcegroup
to create the resource group before using this role.
Example Playbook
---
- hosts: localhost
name: Create Virtual Network in Azure
vars:
resourcegroup: resourcegroupname
location: northeurope
tag_owner: jesper
tag_project: demoproject
tasks:
- name: Azure Resource Group
include_role:
name: jesperberth.az_resourcegroup
- name: Azure Virtual Network
include_role:
name: jesperberth.az_virtualnetwork
License
BSD
Author Information
Jesper Berth
Installa
ansible-galaxy install jesperberth.az_virtualnetwork
Licenza
Unknown
Download
190
Proprietario