Changeset - fefde7a74438
[Not reviewed]
0 5 0
Branko Majic (branko) - 2 months ago 2024-02-26 22:22:07
branko@majic.rs
MAR-192: Added support for Debian 12 Bookworm to common role:

- Use slightly more memory for Debian 12 Bookworm VMs, they have a
tendency to OOM otherwise (march of progress).
- Update regex for matching the DIR_MODE confiuration in Debian 12.
- Remove NTP pacakges if ntp_pools parameter was not set.
5 files changed with 58 insertions and 5 deletions:
0 comments (0 inline, 0 general)
docs/rolereference.rst
Show inline comments
 
@@ -478,6 +478,7 @@ Distribution compatibility
 
Role is compatible with the following distributions:
 

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

	
 

	
 
Examples
roles/common/meta/main.yml
Show inline comments
 
@@ -23,3 +23,4 @@ galaxy_info:
 
    - name: Debian
 
      versions:
 
        - 11
 
        - 12
roles/common/molecule/default/molecule.yml
Show inline comments
 
@@ -14,7 +14,7 @@ lint:
 

	
 
platforms:
 
  - name: helper
 
    box: debian/bullseye64
 
    box: debian/bookworm64
 
    memory: 512
 
    cpus: 1
 
    provider_raw_config_args:
 
@@ -34,7 +34,7 @@ platforms:
 
    groups:
 
      - client
 
      - client-allowed
 
    box: debian/bullseye64
 
    box: debian/bookworm64
 
    memory: 256
 
    cpus: 1
 
    provider_raw_config_args:
 
@@ -54,7 +54,7 @@ platforms:
 
    groups:
 
      - client
 
      - client-disallowed
 
    box: debian/bullseye64
 
    box: debian/bookworm64
 
    memory: 256
 
    cpus: 1
 
    provider_raw_config_args:
 
@@ -108,6 +108,44 @@ platforms:
 
        netmask: 116
 
        type: static
 

	
 
  - name: parameters-mandatory-bookworm
 
    groups:
 
      - parameters-mandatory
 
    box: debian/bookworm64
 
    memory: 384
 
    cpus: 1
 
    provider_raw_config_args:
 
      - "customize ['modifyvm', :id, '--paravirtprovider', 'minimal']"
 
    interfaces:
 
      - auto_config: true
 
        ip: 192.168.56.21
 
        network_name: private_network
 
        type: static
 
      - auto_config: true
 
        ip: fd00::192:168:56:21
 
        network_name: private_network
 
        netmask: 116
 
        type: static
 

	
 
  - name: parameters-optional-bookworm
 
    groups:
 
      - parameters-optional
 
    box: debian/bookworm64
 
    memory: 384
 
    cpus: 1
 
    provider_raw_config_args:
 
      - "customize ['modifyvm', :id, '--paravirtprovider', 'minimal']"
 
    interfaces:
 
      - auto_config: true
 
        ip: 192.168.56.22
 
        network_name: private_network
 
        type: static
 
      - auto_config: true
 
        ip: fd00::192:168:56:22
 
        network_name: private_network
 
        netmask: 116
 
        type: static
 

	
 
provisioner:
 
  name: ansible
 
  playbooks:
roles/common/molecule/default/prepare.yml
Show inline comments
 
@@ -74,6 +74,10 @@
 
        192.168.56.32: parameters-optional-bullseye
 
        fd00::192:168:56:31: parameters-mandatory-bullseye
 
        fd00::192:168:56:32: parameters-optional-bullseye
 
        192.168.56.21: parameters-mandatory-bookworm
 
        192.168.56.22: parameters-optional-bookworm
 
        fd00::192:168:56:21: parameters-mandatory-bookworm
 
        fd00::192:168:56:22: parameters-optional-bookworm
 

	
 
- hosts: parameters-mandatory,parameters-optional
 
  become: true
roles/common/tasks/main.yml
Show inline comments
 
@@ -61,7 +61,7 @@
 
    dest: "/etc/adduser.conf"
 
    state: present
 
    backrefs: true
 
    regexp: '^DIR_MODE='
 
    regexp: '^\s*#?\s*DIR_MODE='
 
    line: 'DIR_MODE=0750'
 

	
 
- name: Deploy bash profile configuration for fancier prompts
 
@@ -103,7 +103,7 @@
 
    owner: root
 
    group: root
 
    mode: 0640
 
  # Checksums: bullseye
 
  # Checksums: bullseye and bookworm (same)
 
  when: |
 
    root_bashrc_stat.stat.checksum == "1a422a148ad225aa5ba33f8dafd2b7cfcdbd701f"
 

	
 
@@ -483,6 +483,15 @@
 
    state: present
 
  when: ntp_pools | length > 0
 

	
 
- name: Remove NTP packages
 
  apt:
 
    name:
 
      - ntpsec
 
      - ntpsec-ntpdate
 
    state: absent
 
    purge: true
 
  when: ntp_pools | length == 0
 

	
 
- name: Deploy NTP configuration
 
  template:
 
    src: "ntp.conf.j2"
0 comments (0 inline, 0 general)