mirror of
https://github.com/dredx/prole.git
synced 2026-09-27 22:54:30 +00:00
- Added tasks and playbooks for K3s datastore export/import using MariaDB Tools role, with associated tests and defaults. - Enhanced iSCSI role to support mkfs-once logic and safer re-initialization of block storage. - Migrated iSCSI-backed Rancher data from retropie to merlin.prole.org. - Updated k3s roles/playbooks to relax Rancher storage preflight checks, supporting PARTUUID-based mounts. - Adjusted Samba AD NetBIOS name derivation to use uppercase short hostname by default. - Incremented prole DB version to 104, updated generated prole.cfg, inventory, and recovery manifest templates.
45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
---
|
|
- name: Add a representative AD DC host for template rendering
|
|
hosts: localhost
|
|
connection: local
|
|
gather_facts: false
|
|
become: false
|
|
|
|
tasks:
|
|
- name: Add myrddin.prole.org as a local-connection host
|
|
ansible.builtin.add_host:
|
|
name: myrddin.prole.org
|
|
groups: samba_ad_dc_test_hosts
|
|
ansible_connection: local
|
|
|
|
- name: Render smb.conf and assert netbios name derives from short hostname
|
|
hosts: samba_ad_dc_test_hosts
|
|
connection: local
|
|
gather_facts: false
|
|
become: false
|
|
|
|
vars:
|
|
_rendered_path: /tmp/samba_ad_dc_smb.conf
|
|
|
|
tasks:
|
|
- name: Load samba_ad_dc role defaults
|
|
ansible.builtin.include_vars:
|
|
file: "{{ playbook_dir }}/../defaults/main.yml"
|
|
|
|
- name: Render smb.conf template
|
|
ansible.builtin.template:
|
|
src: "{{ playbook_dir }}/../templates/smb.conf.j2"
|
|
dest: "{{ _rendered_path }}"
|
|
mode: "0600"
|
|
|
|
- name: Read rendered smb.conf
|
|
ansible.builtin.slurp:
|
|
src: "{{ _rendered_path }}"
|
|
register: _smb_conf
|
|
|
|
- name: Assert netbios name is the uppercase short hostname
|
|
ansible.builtin.assert:
|
|
that:
|
|
- (_smb_conf.content | b64decode) is search('(?m)^\\s*netbios name\\s*=\\s*MYRDDIN\\s*$')
|
|
fail_msg: >-
|
|
Expected smb.conf to contain: netbios name = MYRDDIN |