Renamed desk roles and added vars/main.yml files where mising

This commit is contained in:
Kevin Veen-Birkenbach 2025-07-10 14:19:59 +02:00
parent 5a3535187a
commit e794da47e2
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
26 changed files with 74 additions and 10 deletions

64
cli/ensure_vars_main.py Normal file
View File

@ -0,0 +1,64 @@
#!/usr/bin/env python3
import argparse
import os
from pathlib import Path
def main():
parser = argparse.ArgumentParser(
description="Generate (or preview) missing vars/main.yml for all roles with a given prefix"
)
parser.add_argument(
"--prefix",
required=True,
help="Role-name prefix to scan for (e.g. 'desk-')"
)
parser.add_argument(
"--preview",
action="store_true",
help="If set, only show what would be done without making changes"
)
args = parser.parse_args()
prefix = args.prefix
preview = args.preview
# Locate roles/ directory relative to this script
script_dir = Path(__file__).resolve().parent
roles_dir = (script_dir / "../roles").resolve()
if not roles_dir.is_dir():
print(f"Error: roles directory not found at {roles_dir}")
return
missing = []
for role in sorted(roles_dir.iterdir()):
if not role.is_dir():
continue
if not role.name.startswith(prefix):
continue
vars_dir = role / "vars"
vars_main = vars_dir / "main.yml"
if not vars_main.exists():
missing.append((role.name, vars_main))
if not missing:
print(f"No missing vars/main.yml files found for prefix '{prefix}'")
return
for role_name, vars_main in missing:
app_id = role_name[len(prefix):]
content = f"application_id: \"{app_id}\"\n"
if preview:
print(f"Would create: {vars_main}")
print(f"With content:\n{content}")
else:
# ensure directory exists
vars_main.parent.mkdir(parents=True, exist_ok=True)
# write file
with open(vars_main, "w") as f:
f.write(content)
print(f"Created {vars_main}")
if __name__ == "__main__":
main()

View File

@ -14,7 +14,7 @@ galaxy_info:
- browser
repository: "https://github.com/kevinveenbirkenbach/cymais"
issue_tracker_url: "https://github.com/kevinveenbirkenbach/cymais/issues"
documentation: "https://github.com/kevinveenbirkenbach/cymais/tree/main/roles/util-desk-browser-firefox"
documentation: "https://github.com/kevinveenbirkenbach/cymais/tree/main/roles/desk-firefox"
min_ansible_version: "2.9"
platforms:
- name: Archlinux

View File

@ -6,7 +6,7 @@ This Ansible role serves as a wrapper to install and configure multiple browsers
## Overview
The **util-desk-browser** role orchestrates the deployment of two specialized roles: **util-desk-browser-chromium** and **util-desk-browser-firefox**. By executing both roles, it provides a unified solution for browser management, making it easier to maintain a secure and consistent browsing environment across your systems.
The **util-desk-browser** role orchestrates the deployment of two specialized roles: **desk-chromium** and **desk-firefox**. By executing both roles, it provides a unified solution for browser management, making it easier to maintain a secure and consistent browsing environment across your systems.
## Purpose

View File

@ -34,5 +34,5 @@ galaxy_info:
issue_tracker_url: https://s.veen.world/cymaisissues
documentation: https://s.veen.world/cymais
dependencies:
- util-desk-browser-chromium
- util-desk-browser-firefox
- desk-chromium
- desk-firefox

View File

@ -18,7 +18,7 @@ To reduce setup time and ensure consistency across developer workstations, this
- **Installs Visual Studio Code:** A powerful code editor with a wide plugin ecosystem.
- **Extensible Design:** Acts as a base layer for more specific development stacks (e.g., web, Python, embedded).
- **Persona Integration:** Extends the `util-gen-administrator` for technical users with a development focus.
- **Persona Integration:** Extends the `util-gen-admin` for technical users with a development focus.
## Credits 📝

View File

@ -24,5 +24,5 @@ galaxy_info:
issue_tracker_url: https://s.veen.world/cymaisissues
documentation: https://s.veen.world/cymais
dependencies:
- util-gen-administrator
- util-gen-admin
- pkgmgr

View File

@ -8,7 +8,7 @@ Learn more about Linux network tools on the [Arch Wiki - Network Tools](https://
## Overview
This role enhances the base `util-gen-administrator` role by adding tools specifically for analyzing, debugging, and monitoring network traffic and connectivity.
This role enhances the base `util-gen-admin` role by adding tools specifically for analyzing, debugging, and monitoring network traffic and connectivity.
## Purpose

View File

@ -23,4 +23,4 @@ galaxy_info:
issue_tracker_url: https://s.veen.world/cymaisissues
documentation: https://s.veen.world/cymais
dependencies:
- util-gen-administrator
- util-gen-admin

View File

@ -5,7 +5,7 @@
include_role:
name: "{{ item }}"
loop:
- util-gen-administrator
- util-gen-admin
- drv-non-free
- name: util-desk-office-tools

View File

@ -9,7 +9,7 @@ ROLES_DIR = Path(__file__).resolve().parent.parent.parent / "roles"
class TestApplicationIdConsistency(unittest.TestCase):
def test_application_id_matches_docker_prefix(self):
failed_roles = []
prefixes = ("web-app-", "web-svc-")
prefixes = ("web-app-", "web-svc-", "desk-")
for role_path in ROLES_DIR.iterdir():
if not role_path.is_dir():