Commit Graph

56 Commits

Author SHA1 Message Date
e0389aae85 style 💎: Improve regex pattern for parsing samba provision output
Updated the regex pattern to correctly extract private/krb5.conf paths from the samba provision output, ensuring accurate configuration file detection.
2025-11-06 06:48:46 +01:00
b4408b2dfe refactor ♻️: Improve regex pattern matching for kerberos configuration
Updated regular expressions in the `kerberos.yml` file to correctly extract and format Kerberos configuration paths, ensuring consistency and accuracy in the Ansible playbook.
2025-11-06 06:37:23 +01:00
7f560f7653 refactor ♻️: Improve Kerberos configuration validation and extraction
Updated the Ansible playbook to validate the presence of the krb5.conf file, extract its path, and display it in a debug message. Additionally, added checks for the file's existence on disk and its contents to ensure proper Kerberos configuration.
2025-11-06 06:30:35 +01:00
2b97e9b61b refactor ♻️: Improve regex pattern for extracting krb5 conf path
Updated the regular expression to correctly extract the absolute path of the krb5.conf file from the samba provision output, removing unnecessary quotes and commas.
2025-11-06 06:18:18 +01:00
89e5606a4a Merge branch 'main' of https://repo.piave7.duckdns.org/Jose/samba-ad-dc 2025-11-06 06:13:44 +01:00
43f0ef58e7 style 💎: Improve regex pattern for extracting krb5 conf path
Updated the regular expression to correctly extract the absolute path of the krb5.conf file from the samba provision output. This change ensures that the extracted path is properly formatted and can be used in subsequent tasks.
2025-11-06 06:13:41 +01:00
b5b3d9384f style 💎: Improve regex pattern for extracting krb5 conf path
Updated the regular expression to correctly extract the absolute path of the krb5.conf file from the samba provision output. This change ensures that the extracted path is properly formatted and can be used in subsequent tasks.
2025-11-06 06:07:39 +01:00
b87ab88f52 style 💎: Update regex pattern for finding krb5.conf path
Updated the regular expression to correctly extract the krb5.conf path from the Samba provision output, ensuring consistency in the configuration file location.
2025-11-06 05:52:17 +01:00
6db8e3d015 style 💎: Improve krb5_conf_path extraction regex
Updated the regular expression to extract the absolute path of the krb5.conf file from the samba provision output, ensuring a more accurate and reliable value.
2025-11-05 22:59:54 +01:00
1bf10307a6 style 💎: Update regex pattern in kerberos.yml
Updated the regular expression to correctly extract the krb5.conf path from the Samba provision output. This change ensures that the correct path is used for setting the krb5_conf_path fact.
2025-11-05 22:52:07 +01:00
257d4b925d style 💎: Improve regex pattern for krb5_conf_path variable
Updated the regex pattern to correctly extract the krb5.conf path from the Samba provision output. This change ensures that the variable returns a list of paths even if only one is present.
2025-11-05 22:37:19 +01:00
bb99d469fe style 💎: Improve regex pattern for finding krb5.conf path
Updated the regex pattern to correctly extract the krb5.conf path from the `your_string_variable` value, ensuring a more reliable and consistent configuration setup.
2025-11-05 22:36:19 +01:00
bfdd2d07b3 style 💎: Update regex pattern for extracting krb5.conf path
Updated the regular expression to correctly extract the krb5.conf path from the provision output, ensuring consistency in variable assignment.
2025-11-05 22:20:09 +01:00
e74f9bdb31 feat : Add debug output for krb5.conf path
Added a debug output to display the path of krb5.conf, making it easier to diagnose issues with Samba provisioning.
2025-11-05 21:46:42 +01:00
9cad7d3b64 style 💎: Update regex search for krb5_conf_path
Updated the regex search pattern in the `krb5_conf_path` fact to ensure a list is returned even if no match is found, and added default values for clarity.
2025-11-05 21:37:57 +01:00
fc0aeb908e style 💎: Update regex pattern for krb5.conf path extraction
Updated the regular expression to extract the absolute path of the krb5.conf file from the provision output, ensuring consistency and accuracy in the extracted value.
2025-11-05 21:15:00 +01:00
a48b146e81 refactor ♻️: Improve krb5 configuration path extraction
Refactored the code to use a more robust regex pattern and added a default value for the extracted path.
2025-11-05 21:01:14 +01:00
38858590f8 feat : Add debug logging for samba provision output
Added a debug log to display the samba provision output, making it easier to diagnose issues with the provisioning process.
2025-11-05 20:49:08 +01:00
7205d9870e chore 📦: Update DNS resolver and Kerberos configuration
Updated the setup of DNS resolver and Kerberos configuration to ensure proper domain authentication. This change will improve the overall security of the system.
2025-11-05 20:41:42 +01:00
b9355e6539 feat : Added samba-ad-dc package to Samba packages list
Updated the default Samba configuration to include samba-ad-dc, a package required for Active Directory domain controllers.
2025-11-05 19:07:57 +01:00
0d6e747ba8 commit-message undefined: Improve Samba service management
Enhanced the provision.yml to properly stop and mask regular Samba services, while unmasking and enabling the Samba AD/DC service. This ensures a more robust setup for the domain controller.
2025-11-05 18:57:30 +01:00
767ebb022b refactor ♻️: Simplify Samba version verification and display logic
Renamed debug block to use Ansible debug output, removing unnecessary variables and improving readability. This change aims to make the code more maintainable and efficient.
2025-11-04 21:11:05 +01:00
6afc14a362 style 💎: Fix debug message formatting for Samba version display
Updated debug message to use the correct variable, `samba_version.stdout`, instead of `samba_new_version.stdout`.
2025-11-04 20:58:29 +01:00
e19c0f8b48 commit undefined: Fix Samba version detection and upgrade process
Updated the Ansible playbook to correctly detect the Samba version and perform an upgrade if necessary. The changes also include adding the Samba Team Debian GPG key, repository, and updating the APT cache.
2025-11-04 20:55:38 +01:00
a8a18f93df modified: tasks/install.yml 2025-11-04 20:46:05 +01:00
c76545e816 style 💎: Update Samba repository URL for Debian
Updated the Samba Team Debian repository URL to use the modern method, which includes a signed-by keyring. This change improves security and stability of the package installation process.
2025-11-04 20:38:03 +01:00
e70b483274 style 💎: Update Samba Team GPG key URL
Updated the URL for the Samba Team Debian GPG key to use a more reliable source, ensuring future installations can correctly verify the team's identity.
2025-11-04 20:32:24 +01:00
e150a3306d chore 📦: Update Samba package installation to use modern methods
Updated the Ansible playbook to use modern methods for adding the Samba Team Debian GPG key and repository, making it easier to upgrade to a newer version of Samba. This change also includes updating the APT cache when an upgrade is needed.
2025-11-04 20:27:20 +01:00
69e83cb83a style 💎: Improve Ansible playbook formatting and readability
Refactored the `tasks/preparing.yml` file to improve its structure, readability, and consistency with best practices. This includes updating variable names, adding whitespace, and standardizing indentation.
2025-11-04 20:21:02 +01:00
79fccba876 feat : Added provision step to stop Samba services before installation
Prevents potential conflicts during the installation process by stopping Samba services before provisioning. This ensures a smoother and more reliable setup. The new step is added at line 74 of tasks/install.yml.
2025-11-04 19:51:43 +01:00
47b0eef15d chore 📦: Update Samba package installation to handle known regression in certain builds
Added checks for Samba version 4.22.4 and updated package installation to upgrade if necessary, ensuring a stable build process.
2025-11-04 19:47:29 +01:00
a95fbd4822 Replaced " with ' 2025-11-04 19:22:07 +01:00
3e62e137da style 💎: Update debug message with correct variable usage
Fixed a typo in the debug message, updating it to use the correct variable `samba_domain_info.adminpass` instead of `addc_admin_password`. This ensures accurate output and prevents potential errors. The updated code will now correctly display the admin password for Samba AD DC.
2025-11-04 17:43:49 +01:00
e9382d195f style 💎: Update debug message with new variable
Updated the debug message to include a new variable, allowing for more flexibility in the output. This change improves the readability and maintainability of the Ansible playbook.
2025-11-03 21:11:30 +01:00
7374c1fb52 feat : Add debug message to display admin password
Added a debug message to the Ansible playbook to display the admin password from the Samba domain, allowing for easier testing and debugging of the Samba AD DC setup.
2025-11-03 21:05:33 +01:00
7fd16e195f style 💎: Update admin password in provision.yml
Updated the admin password variable in the provision.yml file to use a dynamically generated value, making it easier to manage and update passwords across different environments.
2025-11-03 20:56:50 +01:00
07d516d8ea style 💎: Update admin pass format in provision.yml
Updated the format of the admin pass variable to match the new expected format, ensuring consistency with other variables.
2025-11-03 20:47:57 +01:00
ba75d48ea6 feat : Stop Samba services before provisioning
Added a new task to stop relevant Samba services before provisioning, ensuring a clean environment for the AD DC setup. This change improves the overall stability and reliability of the provisioning process.
2025-11-03 19:46:40 +01:00
42da69befb style 💎: Improve service configuration for samba-ad-dc
Updated the service configuration to ensure proper stopping of samba-ad-dc before provisioning, improving overall installation stability and consistency.
2025-11-03 19:32:57 +01:00
f85c420c14 style 💎: Update install.yml to use consistent boolean values
Updated the 'ignore_errors' variable from 'yes' to a boolean value 'true' for consistency in the installation script.
2025-11-03 19:26:59 +01:00
92f2c4eb4b chore 📦: Update package list in defaults/main.yml
Updated the list of required packages for Samba, replacing 'dnsutils' with 'bind9-dnsutils'. This change ensures compatibility with the latest DNS server version. No functional changes were made.
2025-11-03 19:07:13 +01:00
d1961671d2 style 💎: Update package manager to use 'pkg' instead of 'pkf'
Switched from 'pkf' to 'pkg' in the Ansible playbook for installing required packages, ensuring consistency with other package managers.
2025-11-03 19:01:33 +01:00
d7efdd1d9a style 💎: Update package installation for samba packages
Updated the Ansible playbook to use apt instead of package for installing samba packages, adding additional options for improved efficiency and cleanup.
2025-11-03 18:42:52 +01:00
497cb6cbf5 style 💎: Update samba provision settings to show password
Updated the `no_log` setting in the `tasks/provision.yml` file to display passwords, allowing for easier debugging and troubleshooting.
2025-11-03 18:26:30 +01:00
7e7c8a4b2d style 💎: Update samba provision task to remove log option
Updated the `no_log` option in the `samba_provision` task to always display passwords, making it easier to debug and understand the provisioning process.
2025-11-03 18:24:17 +01:00
8406e1eab6 feat : Added optional command to show cached Kerberos ticket
Updated verify.yml to include an optional command to display the cached Kerberos ticket, utilizing the 'klist' command and registering its output. This change enhances the flexibility of the verification process.
2025-11-02 19:50:44 +01:00
50dcdfdfbe docs 📝: Update defaults/main.yml documentation
Updated the default values for authentication domain, admin password and IP settings in the main.yml file to ensure consistency with the latest Ansible host configuration.
2025-11-02 19:28:13 +01:00
36a4ac99ed fix 🐛: Update Samba AD DC role for Debian-based systems
Updated the Ansible role to support Debian-based systems (Debian, Ubuntu, etc.) and added new features such as static /etc/resolv.conf, per-host backup of Samba config files, and Molecule tests for both present and absent states.
2025-11-02 19:22:39 +01:00
e6e7f22592 refactor ♻️: Update Samba domain info and provision process
Updated the `samba_domain_info` section to use the new authentication domain and netbios domain. Also updated the `tasks/provision.yml` file to reflect these changes, including the correct realm, domain, server role, and interfaces for the Samba domain.
2025-11-02 18:16:05 +01:00
570500c886 feat : Check domain before provisioning Samba AD DC
Added a check to ensure the domain is not already provisioned before running the samba-tool domain provision command. This prevents duplicate provisions and ensures consistency in the domain setup.
2025-11-02 17:42:35 +01:00