Changeset - 6c4dab8571af
[Not reviewed]
0 4 0
Branko Majic (branko) - 21 months ago 2024-02-25 20:31:26
branko@majic.rs
MAR-192: Added support for Debian 12 Bookworm to preseed role.
4 files changed with 47 insertions and 0 deletions:
0 comments (0 inline, 0 general)
docs/rolereference.rst
Show inline comments
 
@@ -110,48 +110,49 @@ Parameters
 
**preseed_root_password** (string, optional, ``root``)
 
  Initial password that should be set for the server during the installation.
 

	
 
**preseed_server_overrides** (string, optional, ``{}``)
 
  A dictionary consisting out of one or more entries where individual values for
 
  preseed files can be overridden per-server. Each entry's key should be the
 
  name of the server, as specified in the inventory. Each value should also be a
 
  dictionary, where valid keys are: ``country``, ``dns``, ``domain``,
 
  ``gateway``, ``hostname``, ``ip``, ``keymap``, ``language``, ``locale``,
 
  ``mirror_directory``, ``mirror_hostname``, ``mirror_proxy``, ``netmask``,
 
  ``network_auto``, ``network_interface``, ``root_password``,
 
  ``timezone``. These have the same meaning as their ``preseed_`` counterparts.
 

	
 
**preseed_timezone** (string, optional, ``Europe/Stockholm``)
 
  Timezone that should be used when calculating server time. It is assumed that
 
  the local hardware clock is set to UTC.
 

	
 

	
 
Distribution compatibility
 
~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Role is compatible with the following distributions:
 

	
 
- Debian 11 (Bullseye)
 
- Debian 12 (Bookworm)
 

	
 

	
 
Examples
 
~~~~~~~~
 

	
 
Here is an example configuration for a preseed file that sets some global
 
defaults to be used for all servers, and then overrides it for one server:
 

	
 
.. code-block:: yaml
 

	
 
  ---
 

	
 
  ansible_key: {{ lookup('file', '~/.ssh/id_rsa.pub') }}
 
  preseed_country: UK
 
  preseed_directory: /var/www/preseed
 
  preseed_keymap: UK
 
  preseed_language: en
 
  preseed_locale: en_UK.UTF-8
 
  preseed_mirror_directory: /debian
 
  preseed_mirror_hostname: ftp.uk.debian.org
 
  preseed_mirror_proxy: ""
 
  preseed_network_auto: yes
 
  preseed_network_interface: eth0
 
  preseed_root_password: secret
roles/preseed/meta/main.yml
Show inline comments
 
---
 

	
 
galaxy_info:
 
  author: Branko Majic
 
  description: Generates preseed files for Debian
 
  license: BSD
 
  min_ansible_version: 2.9
 
  platforms:
 
    - name: Debian
 
      versions:
 
        - 11
 
        - 12
roles/preseed/molecule/default/group_vars/parameters-optional-with-overrides.yml
Show inline comments
 
---
 

	
 
ansible_key: MY_ANSIBLE_KEY
 
preseed_directory: "/tmp/preseed_files/"
 
preseed_server_overrides:
 
  parameters-optional-with-overrides-bullseye:
 
    country: RS
 
    dns: 1.1.1.1
 
    domain: example.com
 
    gateway: 2.2.2.2
 
    hostname: testing
 
    ip: 3.3.3.3
 
    keymap: sv
 
    language: sr
 
    locale: en_UK.UTF-8
 
    mirror_directory: /
 
    mirror_hostname: ftp.de.debian.org
 
    mirror_proxy: http://proxy.local
 
    netmask: 255.255.0.0
 
    network_auto: false
 
    network_interface: eth1
 
    root_password: myrootpassword
 
    timezone: Europe/Belgrade
 
  parameters-optional-with-overrides-bookworm:
 
    country: RS
 
    dns: 1.1.1.1
 
    domain: example.com
 
    gateway: 2.2.2.2
 
    hostname: testing
 
    ip: 3.3.3.3
 
    keymap: sv
 
    language: sr
 
    locale: en_UK.UTF-8
 
    mirror_directory: /
 
    mirror_hostname: ftp.de.debian.org
 
    mirror_proxy: http://proxy.local
 
    netmask: 255.255.0.0
 
    network_auto: false
 
    network_interface: eth1
 
    root_password: myrootpassword
 
    timezone: Europe/Belgrade
roles/preseed/molecule/default/molecule.yml
Show inline comments
 
@@ -20,42 +20,69 @@ platforms:
 
    box: debian/bullseye64
 
    memory: 256
 
    cpus: 1
 
    provider_raw_config_args:
 
      - "customize ['modifyvm', :id, '--paravirtprovider', 'minimal']"
 

	
 
  - name: parameters-optional-bullseye
 
    groups:
 
      - parameters-optional
 
    box: debian/bullseye64
 
    memory: 256
 
    cpus: 1
 
    provider_raw_config_args:
 
      - "customize ['modifyvm', :id, '--paravirtprovider', 'minimal']"
 

	
 
  - name: parameters-optional-with-overrides-bullseye
 
    groups:
 
      - parameters-optional-with-overrides
 
    box: debian/bullseye64
 
    memory: 256
 
    cpus: 1
 
    provider_raw_config_args:
 
      - "customize ['modifyvm', :id, '--paravirtprovider', 'minimal']"
 

	
 
  - name: parameters-mandatory-bookworm
 
    groups:
 
      - parameters-mandatory
 
    box: debian/bookworm64
 
    memory: 256
 
    cpus: 1
 
    provider_raw_config_args:
 
      - "customize ['modifyvm', :id, '--paravirtprovider', 'minimal']"
 

	
 
  - name: parameters-optional-bookworm
 
    groups:
 
      - parameters-optional
 
    box: debian/bookworm64
 
    memory: 256
 
    cpus: 1
 
    provider_raw_config_args:
 
      - "customize ['modifyvm', :id, '--paravirtprovider', 'minimal']"
 

	
 
  - name: parameters-optional-with-overrides-bookworm
 
    groups:
 
      - parameters-optional-with-overrides
 
    box: debian/bookworm64
 
    memory: 256
 
    cpus: 1
 
    provider_raw_config_args:
 
      - "customize ['modifyvm', :id, '--paravirtprovider', 'minimal']"
 

	
 
provisioner:
 
  name: ansible
 
  config_options:
 
    defaults:
 
      force_valid_group_names: "ignore"
 
      interpreter_python: "/usr/bin/python3"
 
    ssh_connection:
 
      pipelining: "True"
 
  lint:
 
    name: ansible-lint
 

	
 
scenario:
 
  name: default
 

	
 
verifier:
 
  name: testinfra
 
  lint:
 
    name: flake8
0 comments (0 inline, 0 general)