Add support for Ubuntu containers and WSL verification

- Implemented tasks for managing Ubuntu containers using Podman, including inspection, creation, starting, and SSH setup.
- Added verification tasks for WSL and Podman installation, machine existence, and NSSM service status.
- Created PowerShell scripts for Podman auto-start on Windows boot.
- Introduced Prometheus role with default configurations and installation tasks.
- Updated Windows SSH role to improve authorized_keys management and permissions handling.
- Modified inventory to include Windows containers host.
- Updated Grafana datasource configurations with direct IP addresses for Prometheus instances.
This commit is contained in:
2026-06-07 20:35:59 +02:00
parent 3775fa4b6e
commit 25d3eafa5b
34 changed files with 1475 additions and 155 deletions
+7
View File
@@ -0,0 +1,7 @@
---
# NSSM role defaults
nssm_version: "2.24"
nssm_install_dir: "C:\\nssm"
nssm_zip_url: "https://nssm.cc/release/nssm-{{ nssm_version }}.zip"
nssm_zip_path: "{{ (ansible_env.TEMP | default('C:\\Windows\\Temp')) }}\\nssm.zip"
nssm_exe: "{{ nssm_install_dir }}\\nssm-{{ nssm_version }}\\win64\\nssm.exe"
+11
View File
@@ -0,0 +1,11 @@
---
galaxy_info:
author: Alexandre Pires
description: Install NSSM (Non-Sucking Service Manager) on Windows
company: A13Labs
role_name: nssm
namespace: a13labs
license: MIT
min_ansible_version: "2.1"
platforms:
- name: Windows
+55
View File
@@ -0,0 +1,55 @@
---
# Install NSSM on Windows - reusable role
- name: Create NSSM installation directory
ansible.windows.win_file:
path: "{{ nssm_install_dir }}"
state: directory
- name: Check if NSSM is already installed
ansible.windows.win_stat:
path: "{{ nssm_exe }}"
register: __nssm_check
- name: Download NSSM if not installed
ansible.windows.win_get_url:
url: "{{ nssm_zip_url }}"
dest: "{{ nssm_zip_path }}"
force: false
when: not __nssm_check.stat.exists
- name: Extract NSSM if not installed
community.windows.win_unzip:
src: "{{ nssm_zip_path }}"
dest: "{{ nssm_install_dir }}"
delete_archive: false
creates: "{{ nssm_exe }}"
- name: Verify NSSM executable is present
ansible.windows.win_stat:
path: "{{ nssm_exe }}"
register: __nssm_stat
- name: Fail if NSSM executable is missing
ansible.builtin.fail:
msg: >-
nssm binary not found at {{ nssm_exe }}.
Check download/unzip and nssm_version.
when: not __nssm_stat.stat.exists
# - name: Add NSSM to PATH (user level)
# ansible.windows.win_path:
# name: Path
# elements:
# - "{{ nssm_install_dir }}\\nssm-{{ nssm_version }}\\win64"
# state: present
- name: Add NSSM to PATH (system level)
ansible.windows.win_path:
name: Path
elements:
- "{{ nssm_install_dir }}\\nssm-{{ nssm_version }}\\win64"
state: present
become: true
become_method: ansible.builtin.runas
become_user: SYSTEM