lint fixes

This commit is contained in:
willtome
2023-03-07 09:26:22 -05:00
parent 36f113aa75
commit 745b755296
57 changed files with 525 additions and 1135 deletions

View File

@@ -115,4 +115,4 @@
state: present
tags:
owner: "{{ aws_vpc_name }}"
purpose: "{{ aws_purpose_tag }}"
purpose: "{{ aws_purpose_tag }}"

View File

@@ -44,4 +44,4 @@
wait: "{{ aws_ec2_wait }}"
vpc_subnet_id: "{{ aws_subnet_id }}"
user_data: "{{ lookup('template', aws_userdata_template+'.j2', template_vars=dict(aws_vm_name=vm_name)) }}"
register: aws_vm_output
register: aws_vm_output

View File

@@ -1,17 +0,0 @@
---
##############
# Azure Vars
##############
az_region: eastus
az_rg_name: ansible
az_rg_prefix: demo
az_vnet_cidr_block: 10.0.0.0/16
az_subnet_cidr: 10.0.1.0/24
az_vm_name: "{{ vm_name }}"
az_vm_owner: "{{ vm_owner }}"
az_blueprint: "{{ vm_blueprint }}"
az_vm_username: "{{ ansible_user }}"
az_vm_password: "{{ ansible_password }}"
az_env_tag: prod
az_purpose_tag: ansible_demo
az_ansiblegroup_tag: cloud

View File

@@ -1,76 +0,0 @@
---
- name: AZURE | CREATE INFRA | resource group
azure.azcollection.azure_rm_resourcegroup:
name: "{{ az_rg_name }}-{{ az_rg_prefix }}-rg"
location: "{{ az_region }}"
- name: AZURE | CREATE INFRA | virtual network
azure.azcollection.azure_rm_virtualnetwork:
resource_group: "{{ az_rg_name }}-{{ az_rg_prefix }}-rg"
name: "{{ az_rg_name }}-{{ az_rg_prefix }}-vnet"
address_prefixes: "{{ az_vnet_cidr }}"
- name: AZURE | CREATE INFRA | subnet
azure.azcollection.azure_rm_subnet:
resource_group: "{{ az_rg_name }}-{{ az_rg_prefix }}-rg"
name: "{{ az_rg_name }}-{{ az_rg_prefix }}-subnet }}"
address_prefix: "{{ az_subnet_cidr }}"
virtual_network: "{{ az_rg_name }}-{{ az_rg_prefix }}-vnet"
- name: AZURE | CREATE INFRA | security group
azure.azcollection.azure_rm_securitygroup:
resource_group: "{{ az_rg_name }}-{{ az_rg_prefix }}-rg"
name: "{{ az_rg_name }}-{{ az_rg_prefix }}-sec-group"
rules:
- name: External
protocol: Tcp
destination_port_range:
- 80 # HTTP
- 443 # HTTPS
- 5986 # WinRM
- 3389 # RDP
access: Allow
priority: 1001
direction: Inbound
- name: Ping
protocol: Icmp
access: Allow
priority: 1002
direction: Inbound
- name: Internal TCP
protocol: Tcp
destination_port_range:
- 80 # HTTP
- 5986 # WinRM
- 3389 # RDP
- 53 # DNS
- 88 # Kerberos Authentication
- 135 # RPC
- 139 # Netlogon
- 389 # LDAP
- 445 # SMB
- 464 # Kerberos Authentication
- 5432 # PostgreSQL
- 636 # LDAPS (LDAP over TLS)
- 873 # Rsync
- 3268-3269 # Global Catalog
- 1024-65535 # Ephemeral RPC ports
access: Allow
priority: 1003
direction: Inbound
source_address_prefix: "{{ az_vnet_cidr_block }}"
- name: Internal UDP
protocol: Udp
destination_port_range:
- 53 # DNS
- 88 # Kerberos Authentication
- 123 # NTP
- 137-138 # Netlogon
- 389 # LDAP
- 445 # SMB
- 464 # Kerberos Authentication
- 1024-65535 # Ephemeral RPC ports
access: Allow
priority: 1004
direction: Inbound
source_address_prefix: "{{ az_vnet_cidr_block }}"

View File

@@ -1,28 +0,0 @@
---
- name: AZURE | CREATE VM | vnet interface
azure.azcollection.azure_rm_networkinterface:
resource_group: "{{ az_rg_name }}-{{ az_rg_prefix }}-rg"
name: "{{ az_vm_name }}_nic"
public_ip_name: "{{ az_vm_name }}_ip"
virtual_network: "{{ az_rg_name }}-{{ az_rg_prefix }}-vnet"
subnet: "{{ az_rg_name }}-{{ az_rg_prefix }}-subnet }}"
security_group: "{{ az_rg_name }}-{{ az_rg_prefix }}-sec-group"
- name: AZURE | CREATE VM | vm
azure.azcollection.azure_rm_virtualmachine:
resource_group: "{{ az_rg_name }}-{{ az_rg_prefix }}-rg"
name: "{{ az_vm_name }}"
os_type: "{{ az_vm_os_type }}"
vm_size: "{{ az_vm_size }}"
admin_username: "{{ az_vm_username }}"
admin_password: "{{ az_vm_password }}"
network_interfaces: "{{ az_vm_name }}_nic"
image: "{{ az_vm_image }}"
tags:
blueprint: "{{ az_blueprint }}"
purpose: "{{ az_purpose_tag }}"
env: "{{ az_env_tag }}"
ansible_group: "{{ az_ansiblegroup_tag }}"
owner: "{{ az_vm_owner }}"
info: "This instance was built by Red Hat Product Demos"
Name: "{{ az_vm_name }}"

View File

@@ -1,8 +0,0 @@
---
- name: Destroy VM
azure.azcollection.azure_rm_virtualmachine:
resource_group: "{{ az_rg_name }}-{{ az_rg_prefix }}-rg"
name: "{{ inventory_hostname }}"
state: absent
remove_on_absent: all_autocreated
delegate_to: localhost