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
- name: Create Virtual Network "VNET NAME" | |
azure.azcollection.azure_rm_virtualnetwork: | |
name: "VNET NAME" | |
resource_group: "RESOURCE GROUP NAME" | |
address_prefixes_cidr: | |
- "172.16.0.0/16" | |
tags: | |
Environment: "OPTIONAL" |
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
- name: Parse config with native parser | |
ansible.utils.cli_parse: | |
text: "{{ lookup('file', config) }}" | |
parser: | |
name: ansible.netcommon.native | |
os: cisco_asa | |
command: "{{ ( item ) | replace('_',' ') }}" | |
set_fact: "{{ item | replace('-','_') }}" | |
loop: | |
- object |
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
- example: "object-group network TEST-NETWORK" | |
getval: 'object-group\s(?P<type>\S+)\s(?P<name>\S+)' | |
result: | |
"{{ name }}": | |
name: "{{ name }}" | |
type: "{{ type }}" | |
shared: True | |
- example: " network-object host 100.64.0.1" | |
getval: '\snetwork-object\shost\s(?P<host>\S+)' |
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
- name: Parse config with ntc_templates | |
ansible.utils.cli_parse: | |
text: "{{ lookup('file', config) }}" | |
parser: | |
name: ansible.netcommon.ntc_templates | |
os: cisco_asa | |
command: "show running-config {{ ( item ) | replace('_',' ') }}" | |
set_fact: "{{ item | replace('-','_') }}" | |
loop: | |
- ipsec |
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
- name: Parse ACLs for provided configuration | |
cisco.asa.asa_acls: | |
running_config: "{{ lookup('file', config) }}" | |
state: parsed | |
ignore_errors: true | |
register: asa_acls | |
vars: | |
ansible_connection: ansible.netcommon.network_cli | |
ansible_network_os: cisco.asa.asa |
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
- name: Delete SSH Key Pair for instance | |
amazon.aws.ec2_key: | |
name: "{{ ec2_resource_prefix }}-key" | |
region: "{{ ec2_region }}" | |
state: absent |
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
- name: Delete AWS VPC | |
amazon.aws.ec2_vpc_net: | |
name: "{{ ec2_resource_prefix }}-vpc" | |
cidr_block: "{{ ec2_cidr_block }}" | |
region: "{{ ec2_region }}" | |
state: absent |
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
- name: Delete Route Table | |
community.aws.ec2_vpc_route_table: | |
region: "{{ ec2_region }}" | |
vpc_id: "{{ all_vpcs.vpcs[0].vpc_id }}" | |
tags: | |
Environment: "{{ ec2_environment }}" | |
Name: "{{ ec2_resource_prefix }}-route-table" | |
state: absent |
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
- name: Delete internet gateway in Environment {{ ec2_environment }} | |
community.aws.ec2_vpc_igw: | |
region: "{{ ec2_region }}" | |
vpc_id: "{{ item.vpc_id }}" | |
state: absent | |
loop: '{{ all_vpcs.vpcs }}' |
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
- name: Delete Subnet | |
amazon.aws.ec2_vpc_subnet: | |
region: "{{ ec2_region }}" | |
vpc_id: "{{ all_vpcs.vpcs[0].vpc_id }}" | |
cidr: "{{ ec2_subnet }}" | |
state: absent |
NewerOlder