asc.core.core role – This role deploys the main components of the core infrastructure.

Note

This role is part of the asc.core collection (version 1.0.4).

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/core $HOME/.ansible/collections/ansible_collections/asc/core.

To use it in a playbook, specify: asc.core.core.

Entry point main – This role deploys the main components of the core infrastructure.

New in asc.core 1.0.0

Synopsis

  • This role deploys the main components of the core infrastructure.

  • It can either generate new terraform configuration files or configure the systems using Ansible.

  • It can also run ‘terraform plan’, ‘terraform apply’ and ‘terraform destroy’.

Parameters

Parameter

Comments

admin_ssh_key

string / required

SSH public key to use for the admin user on all systems

admin_user

string

Name of the admin user on all systems

Default: "xhackadm"

az_env

string / required

Environment the deployed resources will be tagged with (p: prod, d: dev, t: training, e: demo)

Choices:

  • "p"

  • "d"

  • "t"

  • "e"

az_location

string

Azure location (region) to deploy the resources to

Default: "westeurope"

env_name

string / required

Name of the environment to deploy

internal_domain

string

Internal domain name to use for the deployed resources

Default: "asc.lab"

linux_temp_path

path

Path to use for temporary files on Linux systems

Default: "/opt/maintenance"

owner

string / required

Email address(es) of the person to contact in case of issues with the Azure resources

subscription_id

string / required

Azure subscription ID to deploy the resources to

team

string / required

tenant_id

string

Azure tenant ID to deploy the resources to

Default: "4285841e-a8d8-4b24-a3d7-d71c2fd59b1b"

terraform_apply

boolean

Wether to run ‘terraform apply’ or not

Choices:

  • false ← (default)

  • true

terraform_config

boolean

If ‘true’, generates new terraform configuration files, otherwise will use the existing ones

Choices:

  • false

  • true ← (default)

terraform_destroy

boolean

Wether to run ‘terraform destroy’ or not

Choices:

  • false ← (default)

  • true

terraform_dir

string

The directory where the terraform configuration files are located (relative to the deployment folder)

Default: "./terraform"

terraform_plan

boolean

Wether to run ‘terraform plan’ or not. (implied if ‘terraform_apply’ or ‘terraform_destroy’ is ‘true’)

Choices:

  • false

  • true ← (default)

terraform_remote_state

dictionary

Dictionary of remote state configuration to use for the terraform deployment. If not specified, the remote state will be stored locally.

container_name

string

Azure storage container name to use for the remote state

enabled

boolean

If ‘true’, the remote state will be enabled

Choices:

  • false ← (default)

  • true

key

string

Key to use for the remote state

Default: "terraform.tfstate"

resource_group_name

string

Azure resource group name to use for the remote state

storage_account_name

string

Azure storage account name to use for the remote state

subscription_id

string

Azure subscription ID to use for the remote state

Default: "The value of 'subscription_id'"

tenant_id

string

Azure tenant ID to use for the remote state

Default: "The value of 'tenant_id'"

timezone

string

Timezone to use for the deployed resources

Default: "Europe/Brussels"

windows_temp_path

path

Path to use for temporary files on Windows systems

Default: "C:\\\\maintenance"

Authors

  • Lorenzo Bernardi