asc.xhack.core_xhack role – Deploy the eXtreme Hacking environment’s core infrastructure

Note

This role is part of the asc.xhack collection (version 2.0.0).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it use: git clone git@ssh.dev.azure.com:v3/cloudasc/iac-ansible-collections/xhack $HOME/.ansible/collections/ansible_collections/asc/xhack.

To use it in a playbook, specify: asc.xhack.core_xhack.

Entry point main – Deploy the eXtreme Hacking environment’s core infrastructure

New in asc.xhack 1.0.0

Synopsis

  • Deploys the networking for the eXtreme Hacking environment on top of asc.core - the students, course and lab virtual networks and their peerings - and carves out per-student lab networks when configured for dedicated mode.

  • The course, lab and student roles all build on the networks this role creates.

Parameters

Parameter

Comments

core_xhack_config

dictionary

‘core_xhack’ role configuration

enabled

boolean

Whether to enable the core eXtreme Hacking infrastructure

Choices:

  • false ← (default)

  • true

core_xhack_lab_config

dictionary

added in asc.xhack 2.0.0

Lab network layout.

address_space

string

CIDR the lab network(s) are allocated from.

Default: "10.42.0.0/15"

enabled

boolean

Whether to deploy the lab network.

Choices:

  • false

  • true ← (default)

mode

string

shared deploys one lab network used by every student.

dedicated deploys a separate lab network per student, carved out of address_space.

Choices:

  • "shared" ← (default)

  • "dedicated"

core_xhack_vnets_config

dictionary

added in asc.xhack 2.0.0

Virtual networks for the xHack students, course and lab environments, keyed by vnet name.

Each vnet takes address_space (a CIDR) and subnets, a dict of subnet name to its address_space; a subnet may set allow_all: true to add an allow-all inbound NSG rule.

Merged with the other modules’ vnets into common_vnets_config. See the role defaults for the default layout.

core_xhack_vnets_peering

list / elements=dictionary

added in asc.xhack 2.0.0

Virtual network peerings for the xHack environments, each a primary/secondary pair of vnet names.

Merged with the other modules’ peerings into common_vnets_peering; each peering is created in both directions.

Default: [{"primary": "students", "secondary": "course"}, {"primary": "services", "secondary": "students"}, {"primary": "services", "secondary": "course"}, {"primary": "students", "secondary": "lab"}, {"primary": "services", "secondary": "lab"}]

primary

string / required

Name of the first vnet.

secondary

string / required

Name of the second vnet.

Authors

  • Ignace De Cock