Variables

The following variables are supported:

iso_path

Absolute file path to an ISO file to use as base for preseeding.

If this variable is not especified, a Debian netinstall iso will be downloaded from internet.

This variable is empty by default.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "iso_path=/home/username/my-image.iso"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      iso_path: /home/username/my-image.iso

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "iso_path=/home/username/my-image.iso"

iso_url

Url to obtain a Linux ISO image.

It can be the a full url to an ISO (i.e.: https://mirrors.ucr.ac.cr/debian-cd/current/amd64/iso-cd/debian-10.1.0-amd64-netinst.iso) to fetch a specific Debian version or it can be the base url of that ISO (i.e.: https://mirrors.ucr.ac.cr/debian-cd/current/amd64/iso-cd) to fetch the latest Debian version.

If this url does not refers to an .iso file, then is assumed to be a base ISO URL and the md5 file will be used to obtain the ISO name.

This variable points to https://mirrors.ucr.ac.cr/debian-cd/current/amd64/iso-cd by default.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "iso_url=https://is.gd/TFzT71"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      iso_url: https://is.gd/TFzT71

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "iso_url=https://is.gd/TFzT71"

iso_destination

Local directory path where to store the downloaded Linux ISO file.

Defaults to ~/.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "iso_destination=/home/username/my-downloaded-iso/"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      iso_destination: /home/username/my-downloaded-iso/

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "iso_destination=/home/username/my-downloaded-iso/"

iso_mount

Local directory path where to mount the downloaded Linux ISO to be preseeded.

If this directory does not exist it will be created.

If you want this directory to be deleted at the end of the process, set the delete_iso_mount variable to true.

Defaults to ~/original_iso/.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "iso_mount=/home/username/my-mount/"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      iso_mount: /home/username/my-mount/

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "iso_mount=/home/username/my-mount/"

delete_iso_mount

Wheter to delete or not (at the end of the process) the directory where the original Debian iso is mounted.

Defaults to false.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "delete_iso_mount=true"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      delete_iso_mount: true

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "delete_iso_mount=true"

remaster_mount

Local directory path where to copy the Linux ISO files to be modified to include preseeding.

If you want this directory to be deleted at the end of the process, set the delete_remaster_mount variable to true.

Defaults to ~/remaster_iso/.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "remaster_mount=/home/username/my-remaster/"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      remaster_mount: /home/username/my-remaster/

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "remaster_mount=/home/username/my-remaster/"

delete_remaster_mount

Wheter to delete or not (at the end of the process) the directory where the Linux files to be modified are copied.

Defaults to false.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "delete_remaster_mount=true"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      delete_remaster_mount: true

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "delete_remaster_mount=true"

remaster_destination

Local file path where to save the resulting remastered ISO.

Defaults to ~/remaster.iso.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "remaster_destination=/home/username/my-remaster.iso"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      remaster_destination: /home/username/my-remaster.iso

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "remaster_destination=/home/username/my-remaster.iso"

iso_architecture

The iso architecture, this variable is used to set the path where to copy and modify the preseed.cfg file. Valid values are:

  • amd64: To install x86_64 machines.
  • 386: To install x86 machines.
  • a64: To install arm machines.

Defaults to amd64.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "iso_architecture=amd64"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      iso_architecture: 386

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "iso_architecture=a64"

firmware_path

Local directory path to a folder containing firmware files to be added to the resulting ISO file.

This files must have .deb extension.

This variable answer to the following steps of the Debian Installer:

di_18_add_firmware

This variable is empty by default.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "firmware_path=/home/username/my-firmware/"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      firmware_path: /home/username/my-firmware/

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "firmware_path=/home/username/my-firmware/"

preseed

Wheter to add preseeding to the resulting ISO or not.

If set to false the grub installation step is not preseeded neither.

If this variable is set to true the Debian Installer Variables (listed below) are used to apply preseeding.

This variable answer to the following step of the Debian Installer:

di_11_another_dvd

And:

di_13_popularity_contest

And:

di_14_tasksel

And:

di_15_grub_install

And:

di_19_network_interface

Defaults to false.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "preseed=false"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      preseed: true

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "preseed=false"

preseed_wireless

Wheter to preseed wireless network configuration or not.

You can disable wireless network preseeding when using wired connections or for another particular case.

Defaults to false.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "preseed_wireless=false"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      preseed_wireless: true

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "preseed_wireless=false"

preseed_partitioning

Wheter to apply preseed to partitioning configuration or not.

If set to true the atomic partitioning type is applied on the device specified in the device variable.

On simple terms this variable allows to apply a whole disk partitioning or not (none) partitioning at all.

This variable answer to the following step of the Debian Installer:

di_07_partitioning_guided_manual_whole

And:

di_08_partitioning_whole

And:

di_23_partitioning_biggest_free

And:

di_09_partitioning_end_partitioning

And:

di_10_partitioning_write_changes

Defaults to false.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "preseed_partitioning=false"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      preseed_partitioning: true

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "preseed_partitioning=false"

preseed_desktop

Wheter to apply desktop configuration to the new system or not.

If set to true the gnome desktop enviroment is installed by including the constrictor.desktop ansible role.

When the preseed_custom variable is present and not empty, this variable is ignored.

Defaults to false.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "preseed_desktop=false"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      preseed_desktop: true

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "preseed_desktop=false"

preseed_custom

Absolute path to a .yml file containing some or all of the following configuration:

  • A list of apt repositories to add (see constrict0r.sourcez role).
  • A list of packages to purge via Apt (see constrict0r.aptitude role).
  • A list of packages to install via Apt (see constrict0r.aptitude role).
  • A list of packages to install via yarn (see constrict0r.jsnode role).
  • A list of packages to install via pip (see constrict0r.pyp role).
  • An URL to a skeleton git repository to copy to / (see constrict0r.sysconfig role).
  • A list of services to stop and disable (see constrict0r.servicez role).
  • A list of services to enable and restart (see constrict0r.servicez role).
  • A list of users to create (see constrict0r.users role).
  • A list of groups to add the created users (see constrict0r.group role).
  • A password for each created user.
  • A list of files or URLs to skeleton git repositories to copy to each /home folder (see constrict0r.userconfig role).
  • A list of files or URLs to custom Ansible tasks to run (see constrict0r.task role).

If set to true the constrictor.constructor ansible role will be included to read the specified configuration file and to apply the configuration described on it.

When this variable is present and not empty, the preseed_desktop variable is ignored (as if its value is false).

Defaults to empty.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "preseed_custom=/home/username/my-config.yml"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      preseed_custom: /home/username/my-config.yml

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "preseed_custom=/home/username/my-config.yml"

preseed_last_question

Wheter to preseed or not the last question.

This is useful to prevent multiple installations if the machine keeps booting from an usb drive or similar.

This variable answer to the following steps of the Debian Installer:

di_17_end_installation

Defaults to false.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "preseed_last_question=false"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      preseed_last_question: true

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "preseed_last_question=false"

Installer Variables

locale

Language and country to use.

This variable answer to the following step of the Debian Installer:

di_00_language

Defaults to es_CR.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "locale=us_US"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      locale: us_US

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "locale=us_US"

keyboard

Keyboard distribution to use.

This variable answer to the following step of the Debian Installer:

di_01_keyboard

Defaults to latam.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "keyboard=en_US"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      keyboard: en_US

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "keyboard=en_US"

networkname

Network name to use.

This variable answer to the following steps of the Debian Installer:

di_20_wireless_name

Defaults to mynetwork.

Must use quotes ( or ) when specifying this variable via –extra-vars (-e):

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "networkname='mynetwork'"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      networkname: 'my network with spaces'

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "networkname='mynetwork'"

networkpass

Network password to use.

This variable answer to the following steps of the Debian Installer:

di_21_wireless_pass_type

And:

di_22_wireless_pass

Defaults to 12345678.

Must use quotes ( or ) when specifying this variable via –extra-vars (-e):

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "networkpass='my-password'"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      networkpass: "str@nge!Pass"

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "networkpass='my-password'"

hostname

Hostname to use.

This variable answer to the following step of the Debian Installer:

di_02_hostname

Defaults to debian.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "hostname=my-hostname"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      hostname: my-hostname

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "hostname=my-hostname"

domain

Domain name to use.

This variable answer to the following step of the Debian Installer:

di_03_domain

Defaults to debian.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "domain=my-domain"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      domain: my-domain

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "domain=my-domain"

rootpass

Root user password.

This variable answer to the following step of the Debian Installer:

di_04_root

Defaults to debian.

Must use quotes ( or ) when specifying this variable via –extra-vars (-e):

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "rootpass='my-password'"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      rootpass: "str@nge!Pass"

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "rootpass='my-password'"

username

Non-root username.

This variable answer to the following step of the Debian Installer:

di_05_username

Defaults to debian.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "username=mary"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      username: jhon

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "username=mary"

userpass

Non-root user password.

This variable answer to the following step of the Debian Installer:

di_06_pass

Defaults to debian.

Must use quotes ( or ) when specifying this variable via –extra-vars (-e):

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "userpass='my-password'"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      userpass: "str@nge!Pass"

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "userpass='my-password'"

mirror

Debian mirror url added to sources.

This variable answer to the following steps of the Debian Installer:

di_12_mirror

Defaults to `https://mirrors.ucr.ac.cr <https://mirrors.ucr.ac.cr>`_.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "mirror=https://mirrors.ucr.ac.cr"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      mirror: http://ftp.us.debian.org/debian

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "mirror=https://mirrors.ucr.ac.cr"

device

Device used for partitioning and where to install grub, usually sda or hda.

This variable must not include the text /dev/ but only the device name.

This variable answer to the following step of the Debian Installer:

di_16_grub_device

Defaults to sda.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.iso -K -e \
    "device=sda"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.iso
      device: sdb

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "device=hda"