Jelajahi Sumber

big template and feature updates

xcad 9 bulan lalu
induk
melakukan
3614d5a152
100 mengubah file dengan 89 tambahan dan 2133 penghapusan
  1. 7 2
      cli/__main__.py
  2. 50 3
      cli/core/library.py
  3. 2 0
      cli/core/template.py
  4. 0 12
      cli/modules/ansible.py
  5. 0 13
      cli/modules/docker.py
  6. 0 13
      cli/modules/kubernetes.py
  7. 0 13
      cli/modules/packer.py
  8. 0 13
      cli/modules/terraform.py
  9. 0 19
      library/ansible/checkmk/activate-changes.yaml
  10. 0 17
      library/ansible/checkmk/install-agent.yaml
  11. 0 25
      library/ansible/checkmk/lookup-rule.yaml
  12. 0 22
      library/ansible/checkmk/manage-hosts.yaml
  13. 0 71
      library/ansible/checkmk/manage-rules.yaml
  14. 0 3
      library/ansible/checkmk/secrets.yaml
  15. 0 76
      library/ansible/discord/notify-discord.yaml
  16. 0 52
      library/ansible/docker/docker-certs-enable.yaml
  17. 0 158
      library/ansible/docker/docker-certs.yaml
  18. 0 35
      library/ansible/docker/inst-docker-ubuntu.yaml
  19. 0 59
      library/ansible/docker/install-docker-ubuntu.yml
  20. 0 14
      library/ansible/docker/maint-docker-clean.yaml
  21. 0 46
      library/ansible/kubernetes/README.md
  22. 0 2
      library/ansible/kubernetes/ansible.cfg
  23. 0 318
      library/ansible/kubernetes/inst-k8s.yaml
  24. 0 1
      library/ansible/kubernetes/k8s_worker_node_connection.j2
  25. 0 21
      library/ansible/portainer/deploy-portainer.yaml
  26. 0 18
      library/ansible/traefik/deploy-traefik.yaml
  27. 0 19
      library/ansible/ubuntu/config-add-sshkey.yaml
  28. 0 11
      library/ansible/ubuntu/inst-qemu-agent.yaml
  29. 0 19
      library/ansible/ubuntu/inst-vm-core.yaml
  30. 0 12
      library/ansible/ubuntu/inst-zsh.yaml
  31. 0 25
      library/ansible/ubuntu/maint-diskspace.yaml
  32. 0 16
      library/ansible/ubuntu/maint-reboot-required.yaml
  33. 0 9
      library/ansible/ubuntu/maint-reboot.yaml
  34. 0 14
      library/ansible/ubuntu/upd-apt.yaml
  35. 0 16
      library/ansible/wireguard/inst-wireguard.yaml
  36. 4 3
      library/compose/checkmk/template.yaml
  37. 1 0
      library/compose/clamav/template.yaml
  38. 1 0
      library/compose/dockge/template.yaml
  39. 1 0
      library/compose/gitlab-runner/template.yaml
  40. 0 6
      library/compose/grafana/template.yaml
  41. 1 0
      library/compose/heimdall/template.yaml
  42. 1 0
      library/compose/homeassistant/template.yaml
  43. 1 0
      library/compose/homepage/template.yaml
  44. 1 0
      library/compose/homer/template.yaml
  45. 1 0
      library/compose/influxdb/template.yaml
  46. 1 0
      library/compose/loki/template.yaml
  47. 1 0
      library/compose/mariadb/template.yaml
  48. 1 0
      library/compose/n8n/template.yaml
  49. 1 0
      library/compose/nextcloud/template.yaml
  50. 1 0
      library/compose/nginx/template.yaml
  51. 1 0
      library/compose/nginxproxymanager/template.yaml
  52. 1 0
      library/compose/nodeexporter/template.yaml
  53. 1 0
      library/compose/openwebui/template.yaml
  54. 1 0
      library/compose/passbolt/template.yaml
  55. 1 0
      library/compose/pihole/template.yaml
  56. 0 6
      library/compose/portainer/template.yaml
  57. 1 0
      library/compose/postgres/template.yaml
  58. 1 0
      library/compose/prometheus/template.yaml
  59. 1 0
      library/compose/promtail/template.yaml
  60. 1 0
      library/compose/teleport/template.yaml
  61. 1 0
      library/compose/twingate-connector/template.yaml
  62. 1 0
      library/compose/uptimekuma/template.yaml
  63. 1 0
      library/compose/wazuh/template.yaml
  64. 1 0
      library/compose/whoami/template.yaml
  65. 0 55
      library/docker/webapp/Dockerfile
  66. 0 13
      library/kubernetes/authentik/certificate.yaml
  67. 0 22
      library/kubernetes/authentik/example.middleware.yaml
  68. 0 46
      library/kubernetes/authentik/helm/values.yaml
  69. 0 18
      library/kubernetes/authentik/ingressroute.yaml
  70. 0 5
      library/kubernetes/authentik/namespace.yaml
  71. 0 9
      library/kubernetes/cert-manager/clusterissuer-secret.yaml
  72. 0 17
      library/kubernetes/cert-manager/clusterissuer.yaml
  73. 0 15
      library/kubernetes/cert-manager/example.certificate.yaml
  74. 0 19
      library/kubernetes/cert-manager/helm/values.yaml
  75. 0 13
      library/kubernetes/longhorn/certificate.yaml
  76. 0 53
      library/kubernetes/longhorn/helm/values.yaml
  77. 0 17
      library/kubernetes/longhorn/ingressroute.yaml
  78. 0 13
      library/kubernetes/portainer/certificate.yaml
  79. 0 27
      library/kubernetes/portainer/helm/values.yaml
  80. 0 17
      library/kubernetes/portainer/ingressroute.yaml
  81. 0 15
      library/kubernetes/traefik/certificate.yaml
  82. 0 21
      library/kubernetes/traefik/example.ingressroute.yaml
  83. 0 21
      library/kubernetes/traefik/example.ingressroutetcp.yaml
  84. 0 36
      library/kubernetes/traefik/helm/values.yaml
  85. 0 24
      library/kubernetes/traefik/middleware.yaml
  86. 0 12
      library/kubernetes/twingate_connector/twingate_connector.yaml
  87. 0 10
      library/kubernetes/twingate_operator/helm/values.yaml
  88. 0 31
      library/packer/proxmox/README.md
  89. 0 3
      library/packer/proxmox/credentials.pkr.hcl
  90. 0 1
      library/packer/proxmox/ubuntu-server-focal-docker/files/99-pve.cfg
  91. 0 1
      library/packer/proxmox/ubuntu-server-focal-docker/http/meta-data
  92. 0 33
      library/packer/proxmox/ubuntu-server-focal-docker/http/user-data
  93. 0 161
      library/packer/proxmox/ubuntu-server-focal-docker/ubuntu-server-focal-docker.pkr.hcl
  94. 0 1
      library/packer/proxmox/ubuntu-server-focal/files/99-pve.cfg
  95. 0 1
      library/packer/proxmox/ubuntu-server-focal/http/meta-data
  96. 0 33
      library/packer/proxmox/ubuntu-server-focal/http/user-data
  97. 0 153
      library/packer/proxmox/ubuntu-server-focal/ubuntu-server-focal.pkr.hcl
  98. 0 1
      library/packer/proxmox/ubuntu-server-jammy-docker/files/99-pve.cfg
  99. 0 1
      library/packer/proxmox/ubuntu-server-jammy-docker/http/meta-data
  100. 0 33
      library/packer/proxmox/ubuntu-server-jammy-docker/http/user-data

+ 7 - 2
cli/__main__.py

@@ -21,9 +21,9 @@ from cli.core.registry import registry
 __version__ = "0.0.1"
 
 app = Typer(
-  no_args_is_help=True,
-  help="CLI tool for managing infrastructure boilerplates",
+  help="CLI tool for managing infrastructure boilerplates.\n\n[dim]Easily generate, customize, and deploy templates for Docker Compose, Terraform, Kubernetes, and more.\n\n [white]Made with 💜 by [bold]Christian Lempa[/bold]",
   add_completion=True,
+  rich_markup_mode="rich",
 )
 console = Console()
 
@@ -86,6 +86,11 @@ def main(
   # Store log level in context for potential use by other commands
   ctx.ensure_object(dict)
   ctx.obj['log_level'] = log_level
+  
+  # If no subcommand is provided, show help and friendly intro
+  if ctx.invoked_subcommand is None:
+    console.print(ctx.get_help())
+    sys.exit(0)
 
 def init_app() -> None:
   """Initialize the application by discovering and registering modules.

+ 50 - 3
cli/core/library.py

@@ -25,6 +25,42 @@ class Library:
     self.name = name
     self.path = path
     self.priority = priority  # Higher priority = checked first
+  
+  def _is_template_draft(self, template_path: Path) -> bool:
+    """Check if a template is marked as draft.
+    
+    Args:
+        template_path: Path to the template directory
+    
+    Returns:
+        True if the template is marked as draft, False otherwise
+    """
+    import yaml
+    
+    # Find the template file
+    template_file = None
+    if (template_path / "template.yaml").exists():
+      template_file = template_path / "template.yaml"
+    elif (template_path / "template.yml").exists():
+      template_file = template_path / "template.yml"
+    
+    if not template_file:
+      return False
+    
+    try:
+      with open(template_file, "r", encoding="utf-8") as f:
+        documents = list(yaml.safe_load_all(f))
+        valid_docs = [doc for doc in documents if doc is not None]
+        
+        if not valid_docs:
+          return False
+        
+        template_data = valid_docs[0]
+        metadata = template_data.get("metadata", {})
+        return metadata.get("draft", False)
+    except Exception as e:
+      logger.warning(f"Error checking draft status for {template_path}: {e}")
+      return False
 
   def find_by_id(self, module_name: str, template_id: str) -> tuple[Path, str]:
     """Find a template by its ID in this library.
@@ -37,7 +73,7 @@ class Library:
         Path to the template directory if found
         
     Raises:
-        FileNotFoundError: If the template ID is not found in this library
+        FileNotFoundError: If the template ID is not found in this library or is marked as draft
     """
     logger.debug(f"Looking for template '{template_id}' in module '{module_name}' in library '{self.name}'")
     
@@ -48,6 +84,10 @@ class Library:
     if not (template_path.is_dir() and ((template_path / "template.yaml").exists() or (template_path / "template.yml").exists())):
       raise FileNotFoundError(f"Template '{template_id}' not found in module '{module_name}' in library '{self.name}'")
     
+    # Check if template is marked as draft
+    if self._is_template_draft(template_path):
+      raise FileNotFoundError(f"Template '{template_id}' is marked as draft and cannot be used")
+    
     logger.debug(f"Found template '{template_id}' at: {template_path}")
     return template_path, self.name
 
@@ -55,12 +95,14 @@ class Library:
   def find(self, module_name: str, sort_results: bool = False) -> list[tuple[Path, str]]:
     """Find templates in this library for a specific module.
     
+    Excludes templates marked as draft.
+    
     Args:
         module_name: The module name (e.g., 'compose', 'terraform')
         sort_results: Whether to return results sorted alphabetically
     
     Returns:
-        List of Path objects representing template directories
+        List of Path objects representing template directories (excluding drafts)
         
     Raises:
         FileNotFoundError: If the module directory is not found in this library
@@ -75,11 +117,16 @@ class Library:
       raise FileNotFoundError(f"Module '{module_name}' not found in library '{self.name}'")
     
     # Get all directories in the module path that contain a template.yaml or template.yml file
+    # and are not marked as draft
     template_dirs = []
     try:
       for item in module_path.iterdir():
         if item.is_dir() and ((item / "template.yaml").exists() or (item / "template.yml").exists()):
-          template_dirs.append((item, self.name))
+          # Skip draft templates
+          if not self._is_template_draft(item):
+            template_dirs.append((item, self.name))
+          else:
+            logger.debug(f"Skipping draft template: {item.name}")
     except PermissionError as e:
       raise FileNotFoundError(f"Permission denied accessing module '{module_name}' in library '{self.name}': {e}")
     

+ 2 - 0
cli/core/template.py

@@ -44,6 +44,7 @@ class TemplateMetadata:
   # files: List[str] = field(default_factory=list) # No longer needed, as TemplateFile handles this
   library: str = "unknown"
   next_steps: str = ""
+  draft: bool = False
 
   def __init__(self, template_data: dict, library_name: str | None = None) -> None:
     """Initialize TemplateMetadata from parsed YAML template data.
@@ -74,6 +75,7 @@ class TemplateMetadata:
     self.tags = metadata_section.get("tags", []) or []
     # self.files = metadata_section.get("files", []) or [] # No longer needed
     self.library = library_name or "unknown"
+    self.draft = metadata_section.get("draft", False)
     
     # Extract next_steps (optional)
     raw_next_steps = metadata_section.get("next_steps", "")

+ 0 - 12
cli/modules/ansible.py

@@ -1,12 +0,0 @@
-from __future__ import annotations
-
-from ..core.module import Module
-from ..core.registry import registry
-
-class AnsibleModule(Module):
-  """Module for managing Ansible playbooks and configurations."""
-  
-  name: str = "ansible"
-  description: str = "Manage Ansible playbooks and configurations"
-
-registry.register(AnsibleModule)

+ 0 - 13
cli/modules/docker.py

@@ -1,13 +0,0 @@
-from __future__ import annotations
-
-from ..core.module import Module
-from ..core.registry import registry
-
-class DockerModule(Module):
-  """Module for managing Docker configurations and files."""
-  
-  name: str = "docker"
-  description: str = "Manage Docker configurations and files"
-
-# Register the module
-registry.register(DockerModule)

+ 0 - 13
cli/modules/kubernetes.py

@@ -1,13 +0,0 @@
-from __future__ import annotations
-
-from ..core.module import Module
-from ..core.registry import registry
-
-class KubernetesModule(Module):
-  """Module for managing Kubernetes manifests and configurations."""
-  
-  name: str = "kubernetes"
-  description: str = "Manage Kubernetes manifests and configurations"
-
-# Register the module
-registry.register(KubernetesModule)

+ 0 - 13
cli/modules/packer.py

@@ -1,13 +0,0 @@
-from __future__ import annotations
-
-from ..core.module import Module
-from ..core.registry import registry
-
-class PackerModule(Module):
-  """Module for managing Packer templates and configurations."""
-  
-  name: str = "packer"
-  description: str = "Manage Packer templates and configurations"
-
-# Register the module
-registry.register(PackerModule)

+ 0 - 13
cli/modules/terraform.py

@@ -1,13 +0,0 @@
-from __future__ import annotations
-
-from ..core.module import Module
-from ..core.registry import registry
-
-class TerraformModule(Module):
-  """Terraform module."""
-  
-  name: str = "terraform"
-  description: str = "Manage Terraform configurations"
-
-# Register the module
-registry.register(TerraformModule)

+ 0 - 19
library/ansible/checkmk/activate-changes.yaml

@@ -1,19 +0,0 @@
----
-- name: "Activate Checkmk changes"
-  hosts: localhost
-  gather_facts: false
-  vars_files:
-    - secrets.yaml
-  vars:
-    server_url: "checkmk.home.arpa"
-    site: "cmk"
-
-  tasks:
-    - name: "Start activation on a specific site"
-      checkmk.general.activation:
-        server_url: "{{ server_url }}"
-        site: "{{ site }}"
-        automation_user: "{{ automation_user }}"
-        automation_secret: "{{ automation_secret }}"
-        sites:
-          - "{{ site }}"

+ 0 - 17
library/ansible/checkmk/install-agent.yaml

@@ -1,17 +0,0 @@
----
-- name: "Install Checkmk agent on all hosts"
-  hosts: "{{ my_hosts | d([]) }}"
-  roles:
-    - checkmk.general.agent
-  vars:
-    checkmk_agent_version: "2.4.0p4"
-    checkmk_agent_server: "checkmk.home.arpa"
-    checkmk_agent_server_protocol: https
-    checkmk_agent_site: "cmk"
-    checkmk_agent_auto_activate: true
-    checkmk_agent_tls: "true"  # NOTE: Register Agent to enable TLS
-    checkmk_agent_user: "{{ automation_user }}"
-    checkmk_agent_pass: "{{ automation_secret }}"
-    checkmk_agent_host_name: "{{ ansible_hostname }}"  # NOTE: Required to replace FQDN with hostname only
-  vars_files:
-    - secrets.yaml

+ 0 - 25
library/ansible/checkmk/lookup-rule.yaml

@@ -1,25 +0,0 @@
----
-- name: "Manage Checkmk rules"
-  hosts: localhost
-  gather_facts: false
-  vars_files:
-    - secrets.yaml
-  vars:
-    server_url: "checkmk.home.arpa"
-    site: "cmk"
-
-  tasks:
-    - name: Get a rule with a particular rule id
-      ansible.builtin.debug:
-        msg: "Rule: {{ extensions | to_nice_yaml }}"
-      vars:
-        extensions: "{{
-          lookup('checkmk.general.rule',
-            rule_id='checkmk-rule-id',
-            server_url=server_url,
-            site=site,
-            automation_user=automation_user,
-            automation_secret=automation_secret,
-            validate_certs=False
-            )
-          }}"

+ 0 - 22
library/ansible/checkmk/manage-hosts.yaml

@@ -1,22 +0,0 @@
----
-- name: "Manage Checkmk hosts"
-  hosts: localhost
-  gather_facts: false
-  vars_files:
-    - secrets.yaml
-  vars:
-    server_url: "checkmk.home.arpa"
-    site: "cmk"
-
-  tasks:
-    - name: "Create host"
-      checkmk.general.host:
-        server_url: "{{ server_url }}"
-        site: "{{ site }}"
-        automation_user: "{{ automation_user }}"
-        automation_secret: "{{ automation_secret }}"
-        name: "your-host-name"
-        attributes:
-          ipaddress: "host-ip-address"
-        folder: "/"
-        state: "present"

+ 0 - 71
library/ansible/checkmk/manage-rules.yaml

@@ -1,71 +0,0 @@
----
-- name: "Manage Checkmk rules"
-  hosts: localhost
-  gather_facts: false
-  vars_files:
-    - secrets.yaml
-  vars:
-    server_url: "checkmk.home.arpa"
-    site: "cmk"
-
-  tasks:
-    - name: Create DNS Check Rule
-      checkmk.general.rule:
-        server_url: "{{ server_url }}"
-        site: "{{ site }}"
-        automation_user: "{{ automation_user }}"
-        automation_secret: "{{ automation_secret }}"
-        ruleset: "active_checks:dns"
-        rule:
-          properties: {
-            "comment": "Ansible managed",
-            "description": "DNS DNS Monitoring",
-            "disabled": false,
-          }
-          conditions: {
-            "host_label_groups": [],
-            "host_name": {
-              "match_on": [
-                "your-dns-container-host"
-              ],
-              "operator": "one_of"
-            },
-            "host_tags": [],
-            "service_label_groups": []
-          }
-          "value_raw": {
-            "hostname": "hostname-to-query",
-            "server": "dns-server-ip",
-            "expected_addresses_list": [
-              "expected-ip-address"
-            ]
-          }
-          location:
-            folder: "/"
-            position: "top"
-        state: "present"
-
-    - name: Create NVME Temperature override rule
-      checkmk.general.rule:
-        server_url: "{{ server_url }}"
-        site: "{{ site }}"
-        automation_user: "{{ automation_user }}"
-        automation_secret: "{{ automation_secret }}"
-        ruleset: "checkgroup_parameters:temperature"
-        rule:
-          conditions:
-            host_label_groups: []
-            host_tags: []
-            service_description:
-              match_on:
-                - "DRIVE MODEL NAME*"
-              operator: "one_of"
-            service_label_groups: []
-          location:
-            folder: "/"
-            position: "top"
-          properties:
-            description: "NVME Temperature override"
-            disabled: false
-          value_raw: "{'levels': (60.0, 80.0)}"
-        state: present

+ 0 - 3
library/ansible/checkmk/secrets.yaml

@@ -1,3 +0,0 @@
----
-automation_user: "your-checkmk-user"
-automation_secret: "your-checkmk-password"

+ 0 - 76
library/ansible/discord/notify-discord.yaml

@@ -1,76 +0,0 @@
----
-# This Ansible playbook demonstrates how to send Discord notifications
-# using the `community.general.discord` module.
-# https://docs.ansible.com/ansible/latest/collections/community/general/discord_module.html
-#
-# If you need guidance how to create your own Discord server, see
-# https://support.discord.com/hc/en-us/articles/204849977-How-do-I-create-a-server
-#
-# In order to generate a webhook, please see
-# https://support.discord.com/hc/en-us/articles/360045093012-Server-Integrations-Page
-
-- name: Notify discord
-
-  hosts: "{{ my_hosts | d([]) }}"
-
-  vars:
-    # The name that will be shown as sender of the notification. Note
-    # that some usernames are blocked by Discord, for example it must
-    # not contain the word `discord`.
-    notify_discord_username: Ansible
-
-    # Your Discord webhook URL should have following format. Please
-    # extract following segments of the URL path and set it as value of
-    # the following variables:
-    #
-    # https://discord.com/api/webhooks/nnnnnnnnnn/xxxxxxxxxxxxxxxxxxxxxxxxxxx
-    #                                  |        | |                         |
-    #   notify_discord_webhook_id <----'--------' |                         |
-    #                                             |                         |
-    #   notify_discord_webhook_token <------------'-------------------------'
-    #
-    # Security advise: if you commit this data to a repository it is
-    # strongly recommended to encrypt `notify_discord_webhook_token` using
-    # Ansible Vault.
-    notify_discord_webhook_id: ''
-    notify_discord_webhook_token: ''
-
-    # Do not modify following regular expressions unless you know what
-    # you're doing. Those are to ensure that whatever you've set as
-    # `notify_discord_webhook_id` and `notify_discord_webhook_token`
-    # complies with the Discord API Specification (as of 2024-02-25).
-    #
-    # https://github.com/discord/discord-api-spec/blob/fe9917381e47285b56d98cb72ae3cfe7db9ea19c/specs/openapi.json#L7524-L7531
-    # https://github.com/discord/discord-api-spec/blob/fe9917381e47285b56d98cb72ae3cfe7db9ea19c/specs/openapi.json#L24817-L24821
-    notify_discord_webhook_id_regex: '^0|[1-9][0-9]*$'
-    # https://github.com/discord/discord-api-spec/blob/fe9917381e47285b56d98cb72ae3cfe7db9ea19c/specs/openapi.json#L7532-L7541
-    notify_discord_webhook_token_regex: '^[a-zA-Z0-9_-]+$'
-
-    # The content of the notification
-    notify_discord_webhook_content: |-
-      **Message from `{{ inventory_hostname }}` by *Ansible* ** :tada:
-      Just a test, adjust it to your liking.
-
-      You can use any Markdown formatting here [supported by Discord](
-      https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline).
-
-    # Delegate the sending of the Dicord notification to following host
-    # which must be able to access the public internet on destination
-    # port 443/tcp. When `localhost` is specified, this is sent from
-    # the Ansible Controller, but you can pick any host listed in the
-    # Ansible inventory.
-    notify_discord_send_from_host: localhost
-
-  tasks:
-    - name: Send Discord message
-      community.general.discord:
-        username: "{{ notify_discord_username }}"
-        webhook_id: "{{ notify_discord_webhook_id }}"
-        webhook_token: "{{ notify_discord_webhook_token }}"
-        content: "{{ notify_discord_webhook_content }}"
-      delegate_to: "{{ notify_discord_send_from_host }}"
-      when:
-        - notify_discord_webhook_id is match(notify_discord_webhook_id_regex)
-        - notify_discord_webhook_token is match(notify_discord_webhook_token_regex)
-        - notify_discord_webhook_content | length > 0
-        - notify_discord_send_from_host is in (['localhost'] + groups['all'])

+ 0 - 52
library/ansible/docker/docker-certs-enable.yaml

@@ -1,52 +0,0 @@
----
-- name: "Docker Certs enable"
-  hosts: "{{ my_hosts | d([]) }}"
-  become: true
-  vars:
-    certs_path: "/root/docker-certs"
-
-  tasks:
-    - name: Check if docker certs are existing
-      ansible.builtin.stat:
-        path: "{{ certs_path }}"
-      register: certs_dir
-
-    - name: Fail if docker certs are not existing
-      ansible.builtin.fail:
-        msg: "Docker certificates are not existing in /root/docker-certs."
-      when: not certs_dir.stat.exists
-
-    - name: Get machine's primary internal ip address from eth0 interface
-      ansible.builtin.setup:
-      register: ip_address
-
-    - name: Set machine's primary internal ip address
-      ansible.builtin.set_fact:
-        ip_address: "{{ ip_address.ansible_facts.ansible_default_ipv4.address }}"
-
-    - name: Check if ip_address is a valid ip address
-      ansible.builtin.assert:
-        that:
-          - ip_address is match("^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$")
-        fail_msg: "ip_address is not a valid ip address."
-        success_msg: "ip_address is a valid ip address."
-
-    - name: Change docker daemon to use certs
-      ansible.builtin.lineinfile:
-        path: /lib/systemd/system/docker.service
-        line: >
-          ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
-          -H tcp://{{ ip_address }}:2376 --tlsverify --tlscacert={{ certs_path }}/ca.pem
-          --tlscert={{ certs_path }}/server-cert.pem --tlskey={{ certs_path }}/server-key.pem
-        regexp: '^ExecStart='
-        state: present
-
-    - name: Reload systemd daemon
-      ansible.builtin.systemd:
-        daemon_reload: true
-
-    - name: Restart docker daemon
-      ansible.builtin.systemd:
-        name: docker
-        state: restarted
-        enabled: true

+ 0 - 158
library/ansible/docker/docker-certs.yaml

@@ -1,158 +0,0 @@
----
-- name: "Docker Certs"
-  hosts: "{{ my_hosts | d([]) }}"
-  become: true
-  vars:
-    certs_path: "/root/docker-certs"
-    cert_validity_days: 3650
-    cn_domain: "your-domain.tld"
-
-  tasks:
-    - name: Check if docker certs are existing
-      ansible.builtin.stat:
-        path: "{{ certs_path }}"
-      register: certs_dir
-
-    - name: Create docker certs directory (if needed)
-      ansible.builtin.file:
-        path: "{{ certs_path }}"
-        state: directory
-        mode: '0700'
-      when: not certs_dir.stat.exists
-
-    - name: Check if docker certs directory is empty
-      ansible.builtin.command: ls -A "{{ certs_path }}"
-      register: certs_list
-      when: certs_dir.stat.exists
-      changed_when: false
-      ignore_errors: true
-
-    - name: Fail if docker certs already exist
-      ansible.builtin.fail:
-        msg: "Docker certificates already exist in /root/docker-certs."
-      when: certs_list.stdout | default('') != ''
-
-    - name: Get machine's primary internal ip address from eth0 interface
-      ansible.builtin.setup:
-      register: ip_address
-
-    - name: Set machine's primary internal ip address
-      ansible.builtin.set_fact:
-        ip_address: "{{ ip_address.ansible_facts.ansible_default_ipv4.address }}"
-
-    - name: Check if ip_address is a valid ip address
-      ansible.builtin.assert:
-        that:
-          - ip_address is match("^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$")
-        fail_msg: "ip_address is not a valid ip address."
-        success_msg: "ip_address is a valid ip address."
-
-    - name: Generate CA private key
-      ansible.builtin.command:
-        cmd: >
-          openssl genrsa -out "{{ certs_path }}/ca-key.pem" 4096
-      args:
-        creates: "{{ certs_path }}/ca-key.pem"
-
-    - name: Generate CA certificate
-      ansible.builtin.command:
-        cmd: >
-          openssl req -sha256 -new -x509
-            -subj "/CN={{ cn_domain }}"
-            -days "{{ cert_validity_days }}"
-            -key "{{ certs_path }}/ca-key.pem"
-            -out "{{ certs_path }}/ca.pem"
-      args:
-        creates: "{{ certs_path }}/ca.pem"
-
-    - name: Generate server private key
-      ansible.builtin.command:
-        cmd: >
-          openssl genrsa -out "{{ certs_path }}/server-key.pem" 4096
-        creates: "{{ certs_path }}/server-key.pem"
-
-    - name: Generate server certificate signing request
-      ansible.builtin.command:
-        cmd: >
-          openssl req -sha256 -new
-            -subj "/CN={{ inventory_hostname }}"
-            -key "{{ certs_path }}/server-key.pem"
-            -out "{{ certs_path }}/server.csr"
-        creates: "{{ certs_path }}/server.csr"
-
-    - name: Generate server certificate extension file
-      ansible.builtin.shell: |
-        echo "subjectAltName = DNS:{{ inventory_hostname }},IP:{{ ip_address }},IP:127.0.0.1" >> "{{ certs_path }}/extfile.cnf"
-        echo "extendedKeyUsage = serverAuth" >> "{{ certs_path }}/extfile.cnf"
-      args:
-        creates: "{{ certs_path }}/extfile.cnf"
-
-    - name: Generate server certificate
-      ansible.builtin.command:
-        cmd: >
-          openssl x509 -req -days "{{ cert_validity_days }}" -sha256
-            -in "{{ certs_path }}/server.csr"
-            -CA "{{ certs_path }}/ca.pem"
-            -CAkey "{{ certs_path }}/ca-key.pem"
-            -CAcreateserial -out "{{ certs_path }}/server-cert.pem"
-            -extfile "{{ certs_path }}/extfile.cnf"
-        creates: "{{ certs_path }}/server-cert.pem"
-
-    - name: Generate client private key
-      ansible.builtin.command:
-        cmd: >
-          openssl genrsa -out "{{ certs_path }}/key.pem" 4096
-        creates: "{{ certs_path }}/key.pem"
-
-    - name: Generate client certificate signing request
-      ansible.builtin.command:
-        cmd: >
-          openssl req -sha256 -new
-            -subj "/CN=client"
-            -key "{{ certs_path }}/key.pem"
-            -out "{{ certs_path }}/client.csr"
-        creates: "{{ certs_path }}/client.csr"
-
-    - name: Generate client certificate extension file
-      ansible.builtin.shell: |
-        echo "extendedKeyUsage = clientAuth" >> "{{ certs_path }}/client-extfile.cnf"
-      args:
-        creates: "{{ certs_path }}/client-extfile.cnf"
-
-    - name: Generate client certificate
-      ansible.builtin.command:
-        cmd: >
-          openssl x509 -req -days "{{ cert_validity_days }}"
-            -sha256 -in "{{ certs_path }}/client.csr"
-            -CA "{{ certs_path }}/ca.pem"
-            -CAkey "{{ certs_path }}/ca-key.pem"
-            -CAcreateserial -out "{{ certs_path }}/cert.pem"
-            -extfile "{{ certs_path }}/client-extfile.cnf"
-        creates: "{{ certs_path }}/cert.pem"
-
-    - name: Remove client certificate signing request
-      ansible.builtin.file:
-        path: "{{ certs_path }}/server.csr"
-        state: absent
-
-    - name: Remove client certificate signing request
-      ansible.builtin.file:
-        path: "{{ certs_path }}/client.csr"
-        state: absent
-
-    - name: Remove server certificate extension file
-      ansible.builtin.file:
-        path: "{{ certs_path }}/extfile.cnf"
-        state: absent
-
-    - name: Remove client certificate extension file
-      ansible.builtin.file:
-        path: "{{ certs_path }}/client-extfile.cnf"
-        state: absent
-
-    - name: Set permissions for docker certs
-      ansible.builtin.file:
-        path: "{{ certs_path }}"
-        mode: '0700'
-        recurse: true
-        follow: true

+ 0 - 35
library/ansible/docker/inst-docker-ubuntu.yaml

@@ -1,35 +0,0 @@
----
-- name: Install docker
-  hosts: "{{ my_hosts | d([]) }}"
-  become: true
-
-  tasks:
-    - name: Install docker dependencies
-      ansible.builtin.apt:
-        name:
-          - apt-transport-https
-          - ca-certificates
-          - curl
-          - gnupg-agent
-          - software-properties-common
-        update_cache: true
-
-    - name: Add docker gpg key
-      ansible.builtin.apt_key:
-        url: https://download.docker.com/linux/ubuntu/gpg
-        state: present
-        keyring: /etc/apt/keyrings/docker.gpg
-
-    - name: Add docker repository
-      ansible.builtin.apt_repository:
-        filename: docker
-        repo: deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename | lower }} stable
-        state: present
-
-    - name: Install docker engine
-      ansible.builtin.apt:
-        name:
-          - docker-ce
-          - docker-buildx-plugin
-          - docker-compose-plugin
-        update_cache: true

+ 0 - 59
library/ansible/docker/install-docker-ubuntu.yml

@@ -1,59 +0,0 @@
----
-name: Docker Ubuntu Installation
-description: Installs Docker on Ubuntu systems with best practices
-author: xcad (Christian Lempa)
-date: 2025-08-29
-module: ansible
-files:
-  - handlers/main.yml
-  - vars/main.yml
----
-- name: Install Docker on Ubuntu
-  hosts: ubuntu_servers
-  become: true
-  
-  tasks:
-    - name: Update apt package index
-      apt:
-        update_cache: yes
-        cache_valid_time: 3600
-    
-    - name: Install dependencies
-      apt:
-        name:
-          - apt-transport-https
-          - ca-certificates
-          - curl
-          - gnupg
-          - lsb-release
-        state: present
-    
-    - name: Add Docker GPG key
-      apt_key:
-        url: https://download.docker.com/linux/ubuntu/gpg
-        state: present
-    
-    - name: Add Docker repository
-      apt_repository:
-        repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
-        state: present
-    
-    - name: Install Docker CE
-      apt:
-        name:
-          - docker-ce
-          - docker-ce-cli
-          - containerd.io
-        state: present
-    
-    - name: Start and enable Docker service
-      systemd:
-        name: docker
-        state: started
-        enabled: yes
-    
-    - name: Add user to docker group
-      user:
-        name: "{{ ansible_user }}"
-        groups: docker
-        append: yes

+ 0 - 14
library/ansible/docker/maint-docker-clean.yaml

@@ -1,14 +0,0 @@
----
-- name: Clean docker
-  hosts: "{{ my_hosts | d([]) }}"
-
-  tasks:
-    - name: Prune non-dangling images
-      community.docker.docker_prune:
-        containers: false
-        images: true
-        images_filters:
-          dangling: false
-        networks: false
-        volumes: false
-        builder_cache: false

+ 0 - 46
library/ansible/kubernetes/README.md

@@ -1,46 +0,0 @@
-# Kubernetes (K8s) Installation Script
-
-- Introduction
-- Prerequisites
-- Execution Instructions
-
-## Introduction
-
-> The objective of this playbook is to automate the installation and setup of a kubernetes instance. The playbook consist of 3 main plays. For both controller and nodes, for controller only and for nodes only. It will ask user confirmation before moving on to each stage. By the end of the playbook two files will be created on the controller node named **worker_conn_string** and locally inside the playbook directory with the name **Remote_Files/worker_conn_string**. This will have the **connection string**. (Note:- If you want to join controllers or nodes manually later. For controllers use **--control-plane** flag)
-
-### References
-
-**Documentation** - [https://kubernetes.io/docs/setup/](https://kubernetes.io/docs/setup/)
-
-## Prerequisites
-
-- Atleast 2 VMs  (1 For Control Node and 1 For Worker Node).
-- Static IPs should be set along with unique host names.
-- Inventory should be in this format
-
-```ini
-    [controllers]
-    host_name ansible_ssh_host=<IP> ansible_user='<USERNAME>' ansible_become_pass='<PASSWORD>'
-
-    [nodes]
-
-    [instance:children]
-    controllers
-    nodes
-```
-
-(If you want to change this, don't forget to change the `inst-k8s` as well)
-
-## Execution Instructions
-
-```bash
-ansible-playbook -i <INVENTORY> <PLAYBOOK>
-```
-
-### Optional Flags
-
-| Flag  | Use Case |
-|-------|-----------|
-| --ask-vault-pass | If the vault is encrypted |
-| --start-at-task | If you want to start from a specific task|
-| --tags | If you want to only run a specific group of tasks|

+ 0 - 2
library/ansible/kubernetes/ansible.cfg

@@ -1,2 +0,0 @@
-[defaults]
-timeout = 25

+ 0 - 318
library/ansible/kubernetes/inst-k8s.yaml

@@ -1,318 +0,0 @@
----
-- name: Setup Prerequisites To Install Kubernetes
-  hosts: instance
-  become: true
-  vars:
-    kube_prereq_packages: [curl, ca-certificates, apt-transport-https]
-    kube_packages: [kubeadm, kubectl, kubelet]
-
-  tasks:
-    - name: Test Reacheability
-      ansible.builtin.ping:
-
-    - name: Update Cache
-      ansible.builtin.apt:
-        update_cache: true
-        autoclean: true
-
-    - name: 1. Upgrade All the Packages to the latest
-      ansible.builtin.apt:
-        upgrade: "full"
-
-    - name: 2. Install Qemu-Guest-Agent
-      ansible.builtin.apt:
-        name:
-          - qemu-guest-agent
-        state: present
-
-    - name: 3. Setup a Container Runtime
-      ansible.builtin.apt:
-        name:
-          - containerd
-        state: present
-
-    - name: 4. Start Containerd If Stopped
-      ansible.builtin.service:
-        name: containerd
-        state: started
-
-    - name: 5. Create Containerd Directory
-      ansible.builtin.file:
-        path: /etc/containerd
-        state: directory
-        mode: '0755'
-
-    - name: 6. Check config.toml Exists
-      ansible.builtin.stat:
-        path: /etc/containerd/config.toml
-      register: pre_file_exist_result
-
-    - name: 6.1 Delete config.toml Exists
-      ansible.builtin.file:
-        path: /etc/containerd/config.toml
-        state: absent
-      when: pre_file_exist_result.stat.exists
-
-    - name: 7. Place Default Containerd Config Inside It
-      ansible.builtin.shell: |
-        set -o pipefail
-        containerd config default | sudo tee /etc/containerd/config.toml
-      register: output
-      changed_when: output.rc != 0
-      args:
-        executable: /bin/bash
-      tags:
-        - containerd_config
-
-    - name: 7.1 Check If New config.toml Exists Now
-      ansible.builtin.stat:
-        path: /etc/containerd/config.toml
-      register: post_file_exist_result
-      tags:
-        - containerd_config
-
-    - name: 7.2 Exit The Play If config.toml Does Not Exist
-      ansible.builtin.meta: end_play
-      when: not post_file_exist_result.stat.exists
-      tags:
-        - containerd_config
-
-    - name: 8.1 Disable Swap
-      ansible.builtin.command: sudo swapoff -a
-      register: output
-      changed_when: output.rc != 0
-      tags:
-        - disable_swap
-
-    - name: 8.2 Disable Swap permanently
-      ansible.builtin.replace:
-        path: /etc/fstab
-        regexp: '^([^#].*?\sswap\s+sw\s+.*)$'
-        replace: '# \1'
-      tags:
-        - disable_swap
-
-    - name: 9. Edit config.toml
-      ansible.builtin.replace:
-        path: /etc/containerd/config.toml
-        after: \[plugins\."io\.containerd\.grpc\.v1\.cri"\.containerd\.runtimes\.runc\.options\]
-        regexp: SystemdCgroup = false
-        replace: SystemdCgroup = true
-
-    - name: 10. Enable Ipv4 Bridging
-      ansible.builtin.replace:
-        path: /etc/sysctl.conf
-        regexp: ^#net\.ipv4\.ip_forward=1$
-        replace: net.ipv4.ip_forward=1
-
-    - name: 11.1 Delete k8s Config If Exists
-      ansible.builtin.file:
-        path: /etc/modules-load.d/k8s.conf
-        state: absent
-      tags:
-        - kube_config
-
-    - name: 11.2 Add k8s.config and Edit It
-      ansible.builtin.lineinfile:
-        path: /etc/modules-load.d/k8s.conf
-        line: br_netfilter
-        create: true
-        mode: '0755'
-      tags:
-        - kube_config
-
-    - name: 12.1 Reboot
-      ansible.builtin.reboot:
-      register: system_reboot
-
-    - name: 12.2 Verify Reboot Success
-      ansible.builtin.ping:
-      when: system_reboot.rebooted
-
-    - name: 13.1 Update Cache
-      ansible.builtin.apt:
-        update_cache: true
-        autoclean: true
-      tags:
-        - install_pre_kube_packages
-
-    - name: 13.2 Remove apt lock file
-      ansible.builtin.file:
-        state: absent
-        path: "/var/lib/dpkg/lock"
-      tags:
-        - install_pre_kube_packages
-
-    - name: 13.3 Install Prerequisite Packages
-      ansible.builtin.apt:
-        name: '{{ kube_prereq_packages }}'
-      tags:
-        - install_pre_kube_packages
-
-    - name: 13.4 Remove GPG Keys If They Exist
-      ansible.builtin.file:
-        path: "{{ item }}"
-        state: absent
-      with_items:
-        - /usr/share/keyrings/kubernetes-apt-keyring.gpg
-        - /usr/share/keyrings/kubernetes-apt-keyring.gpg_armored
-      tags:
-        - install_pre_kube_packages
-
-    - name: 13.5 Download Kubernetes APT Key
-      ansible.builtin.get_url:
-        url: https://pkgs.k8s.io/core:/stable:/v1.28/deb/Release.key
-        dest: /usr/share/keyrings/kubernetes-apt-keyring.gpg_armored
-        mode: '0755'
-      tags:
-        - install_pre_kube_packages
-
-    - name: 13.6 De-Armor Kubernetes APT Key
-      ansible.builtin.shell: gpg --dearmor < /usr/share/keyrings/kubernetes-apt-keyring.gpg_armored > /etc/apt/keyrings/kubernetes-apt-keyring.gpg
-      no_log: true
-      args:
-        creates: /etc/apt/keyrings/kubernetes-apt-keyring.gpg
-      tags:
-        - install_pre_kube_packages
-
-    - name: 13.7 Add Kubernetes APT Key
-      ansible.builtin.shell: |
-        set -o pipefail
-        echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.28/deb/ /' \
-        | sudo tee /etc/apt/sources.list.d/kubernetes.list
-      register: apt_output
-      changed_when: apt_output.rc != 0
-      args:
-        executable: /bin/bash
-      tags:
-        - install_pre_kube_packages
-
-    - name: 14.1 Update Cache
-      ansible.builtin.apt:
-        update_cache: true
-        autoclean: true
-      tags:
-        - install_kube_packages
-
-    - name: 14.2 Remove apt lock file
-      ansible.builtin.file:
-        state: absent
-        path: "/var/lib/dpkg/lock"
-      tags:
-        - install_kube_packages
-
-    - name: 14.3 Install Required Packages
-      ansible.builtin.apt:
-        name: '{{ kube_packages }}'
-      tags:
-        - install_kube_packages
-
-    - name: 14.4 Hold Packages
-      ansible.builtin.dpkg_selections:
-        name: '{{ item }}'
-        selection: hold
-      with_items: '{{ kube_packages }}'
-      tags:
-        - install_kube_packages
-
-    - name: Prompt To Continue On To Configuring Control Nodes
-      ansible.builtin.pause:
-        prompt: Press RETURN when you want to continue configuring the Control nodes!
-
-- name: Setup Controller Nodes
-  gather_facts: true
-  hosts: controllers
-  become: true
-
-  tasks:
-    - name: 1. Initialize Cluster
-      ansible.builtin.shell: |
-        set -o pipefail
-        sudo kubeadm init --control-plane-endpoint={{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }} --pod-network-cidr=10.244.0.0/16
-      register: init_cluster_output
-      changed_when: init_cluster_output.rc != 0
-      args:
-        executable: /bin/bash
-
-    - name: 2.1 Create .kube Directory
-      ansible.builtin.file:
-        path: .kube
-        state: directory
-        mode: '0755'
-      tags:
-        - kube_admin_config
-
-    - name: 2.2 Copy Kubernetes Admin Config
-      ansible.builtin.copy:
-        remote_src: true
-        src: /etc/kubernetes/admin.conf
-        dest: .kube/config
-        mode: '0755'
-      tags:
-        - kube_admin_config
-
-    - name: 2.3 Change Config File Permission
-      ansible.builtin.command: chown {{ ansible_env.USER }}:{{ ansible_env.USER }} ".kube/config"
-      changed_when: false
-      when: not ansible_env.HOME is undefined
-      tags:
-        - kube_admin_config
-
-    - name: 3. Install An Overlay Network
-      ansible.builtin.shell: |
-        set -o pipefail
-        kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml
-      register: init_cluster_output
-      become: false
-      changed_when: init_cluster_output.rc != 0
-      args:
-        executable: /bin/bash
-
-    - name: 4.1 Execute Join String Generation Command
-      ansible.builtin.command: kubeadm token create --print-join-command
-      become: false
-      register: join_output
-      changed_when: false
-      tags:
-        - join_string
-
-    - name: 4.2 Display Join String
-      ansible.builtin.debug:
-        msg: 'Join Command : {{ join_output.stdout }}'
-      tags:
-        - join_string
-
-    - name: Copy Connection String To A Remote File
-      ansible.builtin.template:
-        src: k8s_worker_node_connection.j2
-        dest: worker_conn_string
-        mode: '0755'
-
-    - name: Check Connection String File Exists
-      ansible.builtin.stat:
-        path: worker_conn_string
-      register: conn_file_path_remote
-
-    - name: Fetch The Remote File
-      ansible.builtin.fetch:
-        src: worker_conn_string
-        dest: Remote_Files/worker_conn_string
-        flat: true
-      when: conn_file_path_remote.stat.exists
-
-    - name: Prompt To Continue On To Configuring Worker Nodes
-      ansible.builtin.pause:
-        prompt: Press RETURN when you want to continue configuring the Worker nodes!
-
-- name: Join Worker Nodes
-  gather_facts: true
-  hosts: nodes
-  become: true
-  vars:
-    node_conn_string: "{{ lookup('ansible.builtin.file', 'Remote_Files/worker_conn_string') }}"
-
-  tasks:
-    - name: 1. Add Worker Nodes To The Controller
-      ansible.builtin.command: '{{ node_conn_string }}'
-      changed_when: false
-      throttle: 1

+ 0 - 1
library/ansible/kubernetes/k8s_worker_node_connection.j2

@@ -1 +0,0 @@
-{{ join_output.stdout }}

+ 0 - 21
library/ansible/portainer/deploy-portainer.yaml

@@ -1,21 +0,0 @@
----
-- name: Deploy portainer-ce latest
-  hosts: "{{ my_hosts | d([]) }}"
-  become: true
-  become_user: "{{ lookup('env','USER') }}"
-
-  tasks:
-    - name: Create new volume
-      community.docker.docker_volume:
-        name: portainer-data
-
-    - name: Deploy portainer
-      community.docker.docker_container:
-        name: portainer
-        image: "docker.io/portainer/portainer-ce"
-        ports:
-          - "9443:9443"
-        volumes:
-          - /run/docker.sock:/var/run/docker.sock
-          - portainer-data:/data
-        restart_policy: unless-stopped

+ 0 - 18
library/ansible/traefik/deploy-traefik.yaml

@@ -1,18 +0,0 @@
----
-- name: Deploy traefik v2.5
-  hosts: "{{ my_hosts | d([]) }}"
-
-  tasks:
-    - name: Deploy traefik
-      community.docker.docker_container:
-        name: traefik
-        image: "traefik:v2.5"
-        ports:
-          - "80:80"
-          - "443:443"
-        volumes:
-          - /run/docker.sock:/run/docker.sock
-          - /etc/traefik:/etc/traefik
-        restart_policy: unless-stopped
-      become: true
-      become_user: "{{ lookup('env', 'USER') }}"

+ 0 - 19
library/ansible/ubuntu/config-add-sshkey.yaml

@@ -1,19 +0,0 @@
----
-- name: Add ssh key
-  hosts: "{{ my_hosts | d([]) }}"
-  become: true
-
-  tasks:
-    - name: Install public keys
-      ansible.posix.authorized_key:
-        user: "{{ lookup('env', 'USER') }}"
-        state: present
-        key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
-
-    - name: Change sudoers file
-      ansible.builtin.lineinfile:
-        path: /etc/sudoers
-        state: present
-        regexp: '^%sudo'
-        line: '%sudo ALL=(ALL) NOPASSWD: ALL'
-        validate: /usr/sbin/visudo -cf %s

+ 0 - 11
library/ansible/ubuntu/inst-qemu-agent.yaml

@@ -1,11 +0,0 @@
----
-- name: Install qemu-guest-agent package
-  hosts: all
-  become: true
-  become_method: ansible.builtin.sudo
-
-  tasks:
-    - name: Install qemu-guest-agent
-      ansible.builtin.apt:
-        name: qemu-guest-agent
-        state: present

+ 0 - 19
library/ansible/ubuntu/inst-vm-core.yaml

@@ -1,19 +0,0 @@
----
-- name: Install core packages for virtual machines
-  hosts: "{{ my_hosts | d([]) }}"
-  become: true
-
-  tasks:
-    - name: Install packages
-      ansible.builtin.apt:
-        name:
-          - prometheus-node-exporter
-          - nfs-common
-          - qemu-guest-agent
-        update_cache: true
-
-    - name: Start guest qemu-guest-agent
-      ansible.builtin.service:
-        name: qemu-guest-agent
-        state: started
-        enabled: true

+ 0 - 12
library/ansible/ubuntu/inst-zsh.yaml

@@ -1,12 +0,0 @@
----
-- name: Install zsh
-  hosts: "{{ my_hosts | d([]) }}"
-  become: true
-
-  tasks:
-    - name: Install zsh
-      ansible.builtin.apt:
-        name: zsh
-        state: present
-        update_cache: true
-      become: true

+ 0 - 25
library/ansible/ubuntu/maint-diskspace.yaml

@@ -1,25 +0,0 @@
----
-- name: Check disk space
-  hosts: "{{ my_hosts | d([]) }}"
-
-  tasks:
-    - name: Check disk space available
-      ansible.builtin.shell:
-        cmd: |
-          set -euo pipefail
-          df -Ph / | awk 'NR==2 {print $5}'
-        executable: /bin/bash
-      changed_when: false
-      check_mode: false
-      register: disk_usage
-
-#   - name: Send discord message when disk space is over 80%
-#     uri:
-#       url: "your-webhook"
-#       method: POST
-#       body_format: json
-#       body: '{"content": "Disk space on {{ inventory_hostname }} is above 80%!"}'
-#       headers:
-#         Content-Type: application/json
-#       status_code: 204
-#     when: disk_usage.stdout[:-1]|int > 80

+ 0 - 16
library/ansible/ubuntu/maint-reboot-required.yaml

@@ -1,16 +0,0 @@
----
-- name: Check if system reboot is required
-  hosts: "{{ my_hosts | d([]) }}"
-  become: true
-
-  tasks:
-    - name: Check if system reboot is required
-      become: true
-      ansible.builtin.stat:
-        path: /run/reboot-required
-      register: reboot_required
-
-    - name: Report if reboot is required
-      ansible.builtin.debug:
-        msg: "Reboot is required"
-      when: reboot_required.stat.exists

+ 0 - 9
library/ansible/ubuntu/maint-reboot.yaml

@@ -1,9 +0,0 @@
----
-- name: Reboot machine
-  hosts: "{{ my_hosts | d([]) }}"
-  become: true
-
-  tasks:
-    - name: Reboot machine
-      ansible.builtin.reboot:
-        reboot_timeout: 3600

+ 0 - 14
library/ansible/ubuntu/upd-apt.yaml

@@ -1,14 +0,0 @@
----
-- name: Update and upgrade apt packages
-  hosts: all
-
-  tasks:
-    - name: Update packages with apt
-      when: ansible_pkg_mgr == 'apt'
-      ansible.builtin.apt:
-        update_cache: true
-
-    - name: Upgrade packages with apt
-      when: ansible_pkg_mgr == 'apt'
-      ansible.builtin.apt:
-        upgrade: dist

+ 0 - 16
library/ansible/wireguard/inst-wireguard.yaml

@@ -1,16 +0,0 @@
----
-- name: Install wireguard
-  hosts: "{{ my_hosts | d([]) }}"
-  become: true
-
-  tasks:
-    - name: Install wireguard
-      ansible.builtin.apt:
-        name: wireguard
-        update_cache: true
-
-    - name: Generate private and public keypair
-      ansible.builtin.shell: |
-        wg genkey | tee privatekey | wg pubkey > publickey
-        chmod 0400 privatekey
-        chmod 0400 publickey

+ 4 - 3
library/compose/checkmk/template.yaml

@@ -7,9 +7,10 @@ metadata:
   author: Christian Lempa
   date: '2025-09-28'
   tags:
-  - monitoring
-  - docker
-  - compose
+    - monitoring
+    - docker
+    - compose
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/clamav/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - clamav
   - docker
   - compose
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/dockge/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - dockge
   - docker
   - compose
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/gitlab-runner/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - gitlab-runner
   - docker
   - compose
+  draft: true
 spec:
   general:
     vars:

+ 0 - 6
library/compose/grafana/template.yaml

@@ -18,9 +18,3 @@ spec:
         description: "Host port for HTTP (3000)"
         type: int
         default: 3000
-  general:
-    vars:
-      grafana_version:
-        type: string
-        description: Grafana version
-        default: latest

+ 1 - 0
library/compose/heimdall/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - heimdall
   - docker
   - compose
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/homeassistant/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - homeassistant
   - docker
   - compose
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/homepage/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - homepage
   - docker
   - compose
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/homer/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - homer
   - docker
   - compose
+  draft: true
 spec:
   ports:
     vars:

+ 1 - 0
library/compose/influxdb/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - influxdb
   - docker
   - compose
+  draft: true
 spec:
   ports:
     vars:

+ 1 - 0
library/compose/loki/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - loki
   - docker
   - compose
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/mariadb/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - volumes
   - docker
   - compose
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/n8n/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - n8n
   - docker
   - compose
+  draft: true
 spec:
   ports:
     vars:

+ 1 - 0
library/compose/nextcloud/template.yaml

@@ -20,6 +20,7 @@ metadata:
     - cloud
     - file-sharing
     - collaboration
+  draft: true
 spec:
   database:
     required: true

+ 1 - 0
library/compose/nginx/template.yaml

@@ -10,6 +10,7 @@ metadata:
     - nginx
     - web
     - reverse-proxy
+  draft: true
 spec:
   ports:
     vars:

+ 1 - 0
library/compose/nginxproxymanager/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - volumes
   - docker
   - compose
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/nodeexporter/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - node_exporter
   - docker
   - compose
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/openwebui/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - openwebui
   - docker
   - compose
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/passbolt/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - volumes
   - docker
   - compose
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/pihole/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - pihole
   - docker
   - compose
+  draft: true
 spec:
   ports:
     vars:

+ 0 - 6
library/compose/portainer/template.yaml

@@ -25,9 +25,3 @@ spec:
         description: "Host port for Edge agent (8000)"
         type: int
         default: 8000
-  general:
-    vars:
-      portainer_version:
-        type: string
-        description: Portainer version
-        default: latest

+ 1 - 0
library/compose/postgres/template.yaml

@@ -11,6 +11,7 @@ metadata:
   - database
   - sql
   - relational
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/prometheus/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - volumes
   - docker
   - compose
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/promtail/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - promtail
   - docker
   - compose
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/teleport/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - teleport
   - docker
   - compose
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/twingate-connector/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - twingate_connector
   - docker
   - compose
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/uptimekuma/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - volumes
   - docker
   - compose
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/wazuh/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - wazuh.manager
   - docker
   - compose
+  draft: true
 spec:
   general:
     vars:

+ 1 - 0
library/compose/whoami/template.yaml

@@ -10,6 +10,7 @@ metadata:
   - whoami
   - docker
   - compose
+  draft: true
 spec:
   ports:
     vars:

+ 0 - 55
library/docker/webapp/Dockerfile

@@ -1,55 +0,0 @@
----
-name: Basic Web App Dockerfile
-description: Multi-stage Dockerfile for Node.js web applications with security best practices
-author: xcad (Christian Lempa)
-date: 2025-08-29
-module: docker
-files:
-  - .dockerignore
-  - docker-compose.yml
----
-# Multi-stage build for Node.js application
-FROM node:18-alpine AS builder
-
-# Set working directory
-WORKDIR /app
-
-# Copy package files
-COPY package*.json ./
-
-# Install dependencies
-RUN npm ci --only=production
-
-# Copy source code
-COPY . .
-
-# Build application
-RUN npm run build
-
-# Production stage
-FROM node:18-alpine AS production
-
-# Create non-root user
-RUN addgroup -g 1001 -S nodejs && \
-    adduser -S nextjs -u 1001
-
-# Set working directory
-WORKDIR /app
-
-# Copy built application from builder stage
-COPY --from=builder --chown=nextjs:nodejs /app/dist ./dist
-COPY --from=builder --chown=nextjs:nodejs /app/node_modules ./node_modules
-COPY --from=builder --chown=nextjs:nodejs /app/package.json ./package.json
-
-# Switch to non-root user
-USER nextjs
-
-# Expose port
-EXPOSE 3000
-
-# Health check
-HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
-  CMD curl -f http://localhost:3000/health || exit 1
-
-# Start application
-CMD ["npm", "start"]

+ 0 - 13
library/kubernetes/authentik/certificate.yaml

@@ -1,13 +0,0 @@
----
-apiVersion: cert-manager.io/v1
-kind: Certificate
-metadata:
-  name: your-authentik-certificate
-  namespace: authentik
-spec:
-  secretName: your-authentik-tls-secret
-  issuerRef:
-    name: cloudflare-clusterissuer
-    kind: ClusterIssuer
-  dnsNames:
-    - your-authentik-fqdn

+ 0 - 22
library/kubernetes/authentik/example.middleware.yaml

@@ -1,22 +0,0 @@
----
-apiVersion: traefik.io/v1alpha1
-kind: Middleware
-metadata:
-  name: service-middleware
-  namespace: service-namespace
-spec:
-  forwardAuth:
-    address: "http://your-authentik-outpost-name.authentik.svc.cluster.local:9000/outpost.goauthentik.io/auth/traefik"
-    trustForwardHeader: true
-    authResponseHeaders:
-      - X-authentik-username
-      - X-authentik-groups
-      - X-authentik-email
-      - X-authentik-name
-      - X-authentik-uid
-      - X-authentik-jwt
-      - X-authentik-meta-jwks
-      - X-authentik-meta-outpost
-      - X-authentik-meta-provider
-      - X-authentik-meta-app
-      - X-authentik-meta-version

+ 0 - 46
library/kubernetes/authentik/helm/values.yaml

@@ -1,46 +0,0 @@
----
-global:
-  image:
-    repository: "ghcr.io/goauthentik/server"
-    tag: "2025.6.3"
-    pullPolicy: IfNotPresent
-authentik:
-  # (Required)  To generate a secret key run the following command:
-  #             echo $(openssl rand -base64 32)
-  secret_key: ""
-  postgresql:
-    host: ""
-    name: ""
-    user: ""
-    password: ""
-    port: 5432
-  email:
-    # (Optional)  Enable Email Sending
-    #             Highly recommended to notify you about alerts and configuration issues.
-    host: ""
-    port: 587
-    username: ""
-    password: ""
-    use_tls: true
-    from: ""
-  error_reporting:
-    enabled: true
-  log_level: error
-server:
-  ingress:
-    # (Optional)  If you want to securely expose Authentik in Traefik you can enable the
-    #             Ingress settings, alternatively, you can use the template in the
-    #             `authentik/ingressroute.yaml` file to create an IngressRoute.
-    ingressClassName: traefik
-    enabled: true
-    hosts:
-      - your-authentik-fqdn
-    tls:
-      - hosts:
-          - your-authentik-fqdn
-        # (Optional)  If you want to use a custom TLS secret you can specify it here.
-        secretName: your-authentik-tls-secret
-postgresql:
-  enabled: false
-redis:
-  enabled: true

+ 0 - 18
library/kubernetes/authentik/ingressroute.yaml

@@ -1,18 +0,0 @@
----
-apiVersion: traefik.io/v1alpha1
-kind: IngressRoute
-metadata:
-  name: authentik
-  namespace: authentik
-spec:
-  entryPoints:
-    - websecure
-  routes:
-    - match: Host(`your-authentik-fqdn`)
-      kind: Rule
-      services:
-        - name: authentik-server
-          port: 80
-  tls:
-    # (Optional)  If you want to use a custom TLS secret you can specify it here.
-    secretName: your-authentik-tls-secret

+ 0 - 5
library/kubernetes/authentik/namespace.yaml

@@ -1,5 +0,0 @@
----
-apiVersion: v1
-kind: Namespace
-metadata:
-  name: authentik

+ 0 - 9
library/kubernetes/cert-manager/clusterissuer-secret.yaml

@@ -1,9 +0,0 @@
----
-apiVersion: v1
-kind: Secret
-metadata:
-  name: cloudflare-api-token-secret
-  namespace: cert-manager
-type: Opaque
-data:
-  api-token: your-api-token  # <-- Replace with your Cloudflare API token

+ 0 - 17
library/kubernetes/cert-manager/clusterissuer.yaml

@@ -1,17 +0,0 @@
----
-apiVersion: cert-manager.io/v1
-kind: ClusterIssuer
-metadata:
-  name: cloudflare-clusterissuer
-spec:
-  acme:
-    email: your-email@address  # <-- Replace with your email address
-    server: https://acme-v02.api.letsencrypt.org/directory
-    privateKeySecretRef:
-      name: cloudflare-clusterissuer-account-key
-    solvers:
-      - dns01:
-          cloudflare:
-            apiTokenSecretRef:
-              name: cloudflare-api-token-secret
-              key: api-token

+ 0 - 15
library/kubernetes/cert-manager/example.certificate.yaml

@@ -1,15 +0,0 @@
----
-# --> (Example) Create a Certificate for your hostname...
-# apiVersion: cert-manager.io/v1
-# kind: Certificate
-# metadata:
-#   name: your-certificate  # <-- Replace with your certificate name
-#   namespace: your-namespace  # <-- Replace with your namespace
-# spec:
-#   secretName: your-secret  # <-- Replace with your secret name
-#   issuerRef:
-#     name: clusterissuer  # <-- Replace with your issuer name
-#     kind: ClusterIssuer
-#   dnsNames:
-#     - your-hostname  # <-- Replace with your hostname
-# <--

+ 0 - 19
library/kubernetes/cert-manager/helm/values.yaml

@@ -1,19 +0,0 @@
----
-image:
-  repository: quay.io/jetstack/cert-manager-controller
-  tag: v1.18.2
-webhook:
-  image:
-    repository: quay.io/jetstack/cert-manager-webhook
-    tag: v1.18.2
-cainjector:
-  image:
-    repository: quay.io/jetstack/cert-manager-cainjector
-    tag: v1.18.2
-
-crds:
-  enabled: true
-
-extraArgs:
-  - --dns01-recursive-nameservers-only
-  - --dns01-recursive-nameservers=1.1.1.1:53,1.0.0.1:53

+ 0 - 13
library/kubernetes/longhorn/certificate.yaml

@@ -1,13 +0,0 @@
----
-apiVersion: cert-manager.io/v1
-kind: Certificate
-metadata:
-  name: longhorn-certificate
-  namespace: longhorn-system
-spec:
-  secretName: longhorn-certificate-secret
-  dnsNames:
-    - your-fqdn  # <-- Replace with your FQDN
-  issuerRef:
-    name: cloudflare-clusterissuer
-    kind: ClusterIssuer

+ 0 - 53
library/kubernetes/longhorn/helm/values.yaml

@@ -1,53 +0,0 @@
----
-image:
-  longhorn:
-    engine:
-      repository: "longhornio/longhorn-engine"
-      tag: "v1.9.1"
-    manager:
-      repository: "longhornio/longhorn-manager"
-      tag: "v1.9.1"
-    ui:
-      repository: "longhornio/longhorn-ui"
-      tag: "v1.9.1"
-    instanceManager:
-      repository: "longhornio/longhorn-instance-manager"
-      tag: "v1.9.1"
-    shareManager:
-      repository: "longhornio/longhorn-share-manager"
-      tag: "v1.9.1"
-    backingImageManager:
-      repository: "longhornio/backing-image-manager"
-      tag: "v1.9.1"
-    supportBundleKit:
-      repository: "longhornio/support-bundle-kit"
-      tag: "v0.0.60"
-  csi:
-    attacher:
-      repository: "longhornio/csi-attacher"
-      tag: "v4.9.0"
-    provisioner:
-      repository: "longhornio/csi-provisioner"
-      tag: "v5.3.0"
-    nodeDriverRegistrar:
-      repository: "longhornio/csi-node-driver-registrar"
-      tag: "v2.14.0"
-    resizer:
-      repository: "longhornio/csi-resizer"
-      tag: "v1.14.0"
-    snapshotter:
-      repository: "longhornio/csi-snapshotter"
-      tag: "v8.3.0"
-    livenessProbe:
-      repository: "longhornio/livenessprobe"
-      tag: "v2.16.0"
-
-# --> (Optional) Reduce the number of replicas of Longhorn UI
-# longhornUI:
-#   replicas: 1
-# <--
-
-# --> (Optional) Change the default settings, like Backup Target here...
-# defaultBackupStore:
-#   backupTarget: "your-backup-target"  # <-- Replace with your backup target
-# <--

+ 0 - 17
library/kubernetes/longhorn/ingressroute.yaml

@@ -1,17 +0,0 @@
----
-apiVersion: traefik.io/v1alpha1
-kind: IngressRoute
-metadata:
-  name: longhorn-ingressroute
-  namespace: longhorn-system
-spec:
-  entryPoints:
-    - websecure
-  routes:
-    - match: Host(`your-fqdn`)  # <-- Replace with your FQDN
-      kind: Rule
-      services:
-        - name: longhorn-frontend
-          port: 80
-  tls:
-    secretName: longhorn-certificate-secret

+ 0 - 13
library/kubernetes/portainer/certificate.yaml

@@ -1,13 +0,0 @@
----
-apiVersion: cert-manager.io/v1
-kind: Certificate
-metadata:
-  name: portainer-ingressroute-certificate
-  namespace: portainer
-spec:
-  secretName: portainer-certificate-secret
-  issuerRef:
-    name: cloudflare-clusterissuer
-    kind: ClusterIssuer
-  dnsNames:
-    - your-fqdn  # <-- Replace with your FQDN

+ 0 - 27
library/kubernetes/portainer/helm/values.yaml

@@ -1,27 +0,0 @@
----
-image:
-  repository: portainer/portainer-ce
-  tag: 2.33.1
-  pullPolicy: IfNotPresent
-
-service:
-  type: ClusterIP
-
-# --> (Optional) When you want to automatically create an Ingress
-# ingress:
-#   enabled: true
-#   hosts:
-#     - host: "your-fqdn"  # <-- Replace with your FQDN
-#       paths:
-#         - path: /
-#           port: "9000"
-#   tls:
-#     - secretName: portainer-certificate-secret
-#       hosts:
-#         - "your-fqdn"  # <-- Replace with your FQDN
-# <--
-
-# --> (Optional) When using an existing PVC
-# persistence:
-#   existingClaim: "portainer"
-# <--

+ 0 - 17
library/kubernetes/portainer/ingressroute.yaml

@@ -1,17 +0,0 @@
----
-apiVersion: traefik.io/v1alpha1
-kind: IngressRoute
-metadata:
-  name: portainer-ingressroute
-  namespace: portainer
-spec:
-  entryPoints:
-    - websecure
-  routes:
-    - match: Host(`your-fqdn`)  # <-- Replace with your FQDN
-      kind: Rule
-      services:
-        - name: portainer
-          port: 9000
-  tls:
-    secretName: portainer-certificate-secret

+ 0 - 15
library/kubernetes/traefik/certificate.yaml

@@ -1,15 +0,0 @@
----
-# --> (Optional) Securely expose the Traefik dashboard...
-# apiVersion: cert-manager.io/v1
-# kind: Certificate
-# metadata:
-#   name: traefik-web-ui-cert
-#   namespace: traefik
-# spec:
-#   secretName: traefik-web-ui-tls
-#   dnsNames:
-#     - your-traefik-dashboard-fqdn
-#   issuerRef:
-#     name: cloudflare-clusterissuer  # <-- Replace with your issuer name
-#     kind: ClusterIssuer
-# <--

+ 0 - 21
library/kubernetes/traefik/example.ingressroute.yaml

@@ -1,21 +0,0 @@
----
-# --> (Example) Create an IngressRoute for your service...
-# apiVersion: traefik.io/v1alpha1
-# kind: IngressRoute
-# metadata:
-#   name: your-ingressroute  # <-- Replace with your IngressRoute name
-#   namespace: your-namespace  # <-- Replace with your namespace
-# spec:
-#   entryPoints:
-#     - web
-#     - websecure
-#   routes:
-#     - match: Host(`your-fqdn`)  # <-- Replace with your FQDN
-#       kind: Rule
-#       services:
-#         - name: your-service  # <-- Replace with your service name
-#           port: 80
-# --> (Optional) Add certificate secret
-# tls:
-#     secretName: your-certificate-secret
-# <--

+ 0 - 21
library/kubernetes/traefik/example.ingressroutetcp.yaml

@@ -1,21 +0,0 @@
----
-# --> (Example) Create an IngressRouteTCP for your service...
-# apiVersion: traefik.io/v1alpha1
-# kind: IngressRouteTCP
-# metadata:
-#   name: your-ingressroutetcp  # <-- Replace with your IngressRouteTCP name
-#   namespace: your-namespace   # <-- Replace with your namespace
-# spec:
-#   entryPoints:
-#     - web
-#     - websecure
-#   routes:
-#     - match: HostSNI(`your-sni`)  # <-- Replace with your SNI
-#       priority: 10  # <-- (Optional) change rule priority
-#       services:
-#         - name: your-service  # <-- Replace with your service name
-#           port: 80
-# --> (Optional) Enable TLS Passthrough
-# tls:
-#   passthrough: true
-# <--

+ 0 - 36
library/kubernetes/traefik/helm/values.yaml

@@ -1,36 +0,0 @@
----
-image:
-  repository: traefik
-  tag: v3.5.1
-  pullPolicy: IfNotPresent
-
-# --> Change redirect HTTP to HTTPs by default here...
-ports:
-  web:
-    redirections:
-      entryPoint:
-        to: websecure
-        scheme: https
-        permanent: true  # <-- Change this to false if you want a temporary redirect
-# <--
-
-# --> (Optional) Securely expose the Traefik dashboard...
-# ingressRoute:
-#   dashboard:
-#     enabled: true
-#     entryPoints:
-#       - websecure
-#     matchRule: Host(`your-traefik-dashboard-fqdn`)  # <-- Replace with your FQDN
-#     middlewares:
-#       - name: traefik-web-ui-middleware  # <-- Replace with your authentication middleware
-#     tls:
-#       secretName: traefik-web-ui-tls  # <-- Replace with your TLS secret name
-# <--
-
-# --> (Optional) Change log settings here...
-# logs:
-#   general:
-#     level: ERROR
-#   access:
-#     enabled: false
-# <--

+ 0 - 24
library/kubernetes/traefik/middleware.yaml

@@ -1,24 +0,0 @@
----
-# --> (Optional) Securely expose the Traefik dashboard...
-# apiVersion: traefik.io/v1alpha1
-# kind: Middleware
-# metadata:
-#   name: traefik-web-ui-middleware
-#   namespace: traefik
-# spec:
-#   forwardAuth:
-#     address: "http://your-authentik-outpost-fqdn:9000/outpost.goauthentik.io/auth/traefik"
-#     trustForwardHeader: true
-#     authResponseHeaders:
-#       - X-authentik-username
-#       - X-authentik-groups
-#       - X-authentik-email
-#       - X-authentik-name
-#       - X-authentik-uid
-#       - X-authentik-jwt
-#       - X-authentik-meta-jwks
-#       - X-authentik-meta-outpost
-#       - X-authentik-meta-provider
-#       - X-authentik-meta-app
-#       - X-authentik-meta-version
-# <--

+ 0 - 12
library/kubernetes/twingate_connector/twingate_connector.yaml

@@ -1,12 +0,0 @@
----
-apiVersion: twingate.com/v1beta
-kind: TwingateConnector  # NOTE This requires the Twingate Kubernetes Operator to be installed in your Kubernetes cluster.
-metadata:
-  name: twingate_connector
-  namespace: twingate
-spec:
-  image:
-    repository: "twingate/connector"
-    tag: "1.74.0"
-  name: twingate_connector
-  hasStatusNotificationsEnabled: false

+ 0 - 10
library/kubernetes/twingate_operator/helm/values.yaml

@@ -1,10 +0,0 @@
----
-image:
-  repository: twingate/kubernetes-operator
-  pullPolicy: IfNotPresent
-  tag: "0.25.2"
-twingateOperator:
-  network: ""  # FIXME Add your Twingate network name here
-  remoteNetworkId: ""  # FIXME Add your Twingate remote network ID here
-  logFormat: "plain"
-  logVerbosity: "quiet"

+ 0 - 31
library/packer/proxmox/README.md

@@ -1,31 +0,0 @@
-# Packer Proxmox
-
-You can add an additional description here.
-
-## Installing Proxmox plugin
-You have two options:
-- You can add this config block to your pkr.hcl file and run ```packer init```.
-
-```
-packer {
-  required_plugins {
-    name = {
-      version = "~> 1"
-      source  = "github.com/hashicorp/proxmox"
-    }
-  }
-}
-```
-
-- Run ```packer plugins install github.com/hashicorp/proxmox``` to install the plugin globally in packer.
-
-## Running Packer
-
-1. Navigate into the folder you want to create a template with
-2. Run ```packer build -var-file ../credentials.pkr.hcl .```
-
-
-## Troubleshooting 
-- If you have tailscale installed, be aware that packer could grab the IP of your tailscale adapter rather than your LAN. You can either hard code the IP in the boot command or try setting the ```http_interface``` option
-- Sometimes the boot command is typed too fast and can cause issues. You can increase the time between types by using the ```boot_key_interval``` option.
-

+ 0 - 3
library/packer/proxmox/credentials.pkr.hcl

@@ -1,3 +0,0 @@
-proxmox_api_url = "https://0.0.0.0:8006/api2/json"  # Your Proxmox IP Address
-proxmox_api_token_id = "terraform@pam!terraform"  # API Token ID
-proxmox_api_token_secret = "your-api-token-secret"

+ 0 - 1
library/packer/proxmox/ubuntu-server-focal-docker/files/99-pve.cfg

@@ -1 +0,0 @@
-datasource_list: [ConfigDrive, NoCloud]

+ 0 - 1
library/packer/proxmox/ubuntu-server-focal-docker/http/meta-data

@@ -1 +0,0 @@
-

+ 0 - 33
library/packer/proxmox/ubuntu-server-focal-docker/http/user-data

@@ -1,33 +0,0 @@
-#cloud-config
-autoinstall:
-  version: 1
-  locale: en_US
-  keyboard:
-    layout: de
-  ssh:
-    install-server: true
-    allow-pw: true
-    disable_root: true
-    ssh_quiet_keygen: true
-    allow_public_ssh_keys: true
-  packages:
-    - qemu-guest-agent
-    - sudo
-  storage:
-    layout:
-      name: direct
-    swap:
-      size: 0
-  user-data:
-    package_upgrade: false
-    timezone: Europe/Berlin
-    users:
-      - name: your-user-name
-        groups: [adm, sudo]
-        lock-passwd: false
-        sudo: ALL=(ALL) NOPASSWD:ALL
-        shell: /bin/bash
-        # passwd: your-password
-        # - or -
-        # ssh_authorized_keys:
-        #   - your-ssh-key

+ 0 - 161
library/packer/proxmox/ubuntu-server-focal-docker/ubuntu-server-focal-docker.pkr.hcl

@@ -1,161 +0,0 @@
-# Ubuntu Server Focal Docker
-# ---
-# Packer Template to create an Ubuntu Server (Focal) with Docker on Proxmox
-
-# Variable Definitions
-variable "proxmox_api_url" {
-    type = string
-}
-
-variable "proxmox_api_token_id" {
-    type = string
-}
-
-variable "proxmox_api_token_secret" {
-    type      = string
-    sensitive = true
-}
-
-locals {
-    disk_storage = "local-lvm"
-}
-
-# Resource Definiation for the VM Template
-source "proxmox" "ubuntu-server-focal-docker" {
-
-    # Proxmox Connection Settings
-    proxmox_url = "${var.proxmox_api_url}"
-    username    = "${var.proxmox_api_token_id}"
-    token       = "${var.proxmox_api_token_secret}"
-    # (Optional) Skip TLS Verification
-    # insecure_skip_tls_verify = true
-
-    # VM General Settings
-    node                 = "your-proxmox-node"
-    vm_id                = "100"
-    vm_name              = "ubuntu-server-focal-docker"
-    template_description = "Ubuntu Server Focal Image with Docker pre-installed"
-
-    # VM OS Settings
-    # (Option 1) Local ISO File
-    # boot_iso {
-    #     type         = "scsi"
-    #     iso_file     = "local:iso/ubuntu-20.04.2-live-server-amd64.iso"
-    #     unmount      = true
-    #     iso_checksum = "f8e3086f3cea0fb3fefb29937ab5ed9d19e767079633960ccb50e76153effc98"
-    # }
-    # (Option 2) Download ISO
-    # boot_iso {
-    #     type             = "scsi"
-    #     iso_url          = "https://releases.ubuntu.com/20.04/ubuntu-20.04.3-live-server-amd64.iso"
-    #     unmount          = true
-    #     iso_storage_pool = "local"
-    #     iso_checksum     = "file:https://releases.ubuntu.com/focal/SHA256SUMS"
-    # }
-
-    # VM System Settings
-    qemu_agent = true
-
-    # VM Hard Disk Settings
-    scsi_controller = "virtio-scsi-pci"
-
-    disks {
-        disk_size         = "25G"
-        format            = "qcow2"
-        storage_pool      = ${local.disk_storage}
-        type              = "virtio"
-    }
-
-    # VM CPU Settings
-    cores = "1"
-
-    # VM Memory Settings
-    memory = "2048"
-
-    # VM Network Settings
-    network_adapters {
-        model    = "virtio"
-        bridge   = "vmbr0"
-        firewall = "false"
-    }
-
-    # VM Cloud-Init Settings
-    cloud_init              = true
-    cloud_init_storage_pool = ${local.disk_storage}
-
-    # PACKER Boot Commands
-    boot         = "c"
-    boot_wait    = "5s"
-    boot_command = [
-        "<esc><wait><esc><wait>",
-        "<f6><wait><esc><wait>",
-        "<bs><bs><bs><bs><bs>",
-        "autoinstall ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ ",
-        "--- <enter>"
-    ]
-    # Useful for debugging
-    # Sometimes lag will require this
-    # boot_key_interval = "500ms"
-
-    # PACKER Autoinstall Settings
-    http_directory = "http"
-    # (Optional) Bind IP Address and Port
-    # http_bind_address = "0.0.0.0"
-    # http_port_min     = 8802
-    # http_port_max     = 8802
-
-    ssh_username = "your-user-name"
-
-    # (Option 1) Add your Password here
-    # ssh_password = "your-password"
-    # - or -
-    # (Option 2) Add your Private SSH KEY file here
-    # ssh_private_key_file = "~/.ssh/id_rsa"
-
-    # Raise the timeout, when installation takes longer
-    ssh_timeout = "20m"
-}
-
-# Build Definition to create the VM Template
-build {
-
-    name = "ubuntu-server-focal-docker"
-    sources = ["source.proxmox.ubuntu-server-focal-docker"]
-
-    # Provisioning the VM Template for Cloud-Init Integration in Proxmox #1
-    provisioner "shell" {
-        inline = [
-            "while [ ! -f /var/lib/cloud/instance/boot-finished ]; do echo 'Waiting for cloud-init...'; sleep 1; done",
-            "sudo rm /etc/ssh/ssh_host_*",
-            "sudo truncate -s 0 /etc/machine-id",
-            "sudo apt -y autoremove --purge",
-            "sudo apt -y clean",
-            "sudo apt -y autoclean",
-            "sudo cloud-init clean",
-            "sudo rm -f /etc/cloud/cloud.cfg.d/subiquity-disable-cloudinit-networking.cfg",
-            "sudo sync"
-        ]
-    }
-
-    # Provisioning the VM Template for Cloud-Init Integration in Proxmox #2
-    provisioner "file" {
-        source      = "files/99-pve.cfg"
-        destination = "/tmp/99-pve.cfg"
-    }
-
-    # Provisioning the VM Template for Cloud-Init Integration in Proxmox #3
-    provisioner "shell" {
-        inline = [ "sudo cp /tmp/99-pve.cfg /etc/cloud/cloud.cfg.d/99-pve.cfg" ]
-    }
-
-    # Provisioning the VM Template with Docker Installation #4
-    provisioner "shell" {
-        inline = [
-            "sudo apt-get install -y ca-certificates curl gnupg lsb-release",
-            "curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg",
-            "echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null",
-            "sudo apt-get -y update",
-            "sudo apt-get install -y docker-ce docker-ce-cli containerd.io"
-        ]
-    }
-}

+ 0 - 1
library/packer/proxmox/ubuntu-server-focal/files/99-pve.cfg

@@ -1 +0,0 @@
-datasource_list: [ConfigDrive, NoCloud]

+ 0 - 1
library/packer/proxmox/ubuntu-server-focal/http/meta-data

@@ -1 +0,0 @@
-

+ 0 - 33
library/packer/proxmox/ubuntu-server-focal/http/user-data

@@ -1,33 +0,0 @@
-#cloud-config
-autoinstall:
-  version: 1
-  locale: en_US
-  keyboard:
-    layout: de
-  ssh:
-    install-server: true
-    allow-pw: true
-    disable_root: true
-    ssh_quiet_keygen: true
-    allow_public_ssh_keys: true
-  packages:
-    - qemu-guest-agent
-    - sudo
-  storage:
-    layout:
-      name: direct
-    swap:
-      size: 0
-  user-data:
-    package_upgrade: false
-    timezone: Europe/Berlin
-    users:
-      - name: your-user-name
-        groups: [adm, sudo]
-        lock-passwd: false
-        sudo: ALL=(ALL) NOPASSWD:ALL
-        shell: /bin/bash
-        # passwd: your-password
-        # - or -
-        # ssh_authorized_keys:
-        #   - your-ssh-key

+ 0 - 153
library/packer/proxmox/ubuntu-server-focal/ubuntu-server-focal.pkr.hcl

@@ -1,153 +0,0 @@
-# Ubuntu Server Focal
-# ---
-# Packer Template to create an Ubuntu Server (Focal) on Proxmox
-
-# Variable Definitions
-variable "proxmox_api_url" {
-    type = string
-}
-
-variable "proxmox_api_token_id" {
-    type = string
-}
-
-variable "proxmox_api_token_secret" {
-    type      = string
-    sensitive = true
-}
-
-locals {
-    disk_storage = "local-lvm"
-}
-
-# Resource Definiation for the VM Template
-source "proxmox" "ubuntu-server-focal" {
-
-    # Proxmox Connection Settings
-    proxmox_url = "${var.proxmox_api_url}"
-    username    = "${var.proxmox_api_token_id}"
-    token       = "${var.proxmox_api_token_secret}"
-    # (Optional) Skip TLS Verification
-    # insecure_skip_tls_verify = true
-
-    # VM General Settings
-    node                 = "your-proxmox-node"
-    vm_id                = "100"
-    vm_name              = "ubuntu-server-focal"
-    template_description = "Ubuntu Server Focal Image"
-
-    # VM OS Settings
-    # (Option 1) Local ISO File
-    # boot_iso {
-    #     type         = "scsi"
-    #     iso_file     = "local:iso/ubuntu-20.04.2-live-server-amd64.iso"
-    #     unmount      = true
-    #     iso_checksum = "f8e3086f3cea0fb3fefb29937ab5ed9d19e767079633960ccb50e76153effc98"
-    # }
-    # (Option 2) Download ISO
-    # boot_iso {
-    #     type             = "scsi"
-    #     iso_url          = "https://releases.ubuntu.com/20.04/ubuntu-20.04.3-live-server-amd64.iso"
-    #     unmount          = true
-    #     iso_storage_pool = "local"
-    #     iso_checksum     = "file:https://releases.ubuntu.com/focal/SHA256SUMS"
-    # }
-
-    # VM System Settings
-    qemu_agent = true
-
-    # VM Hard Disk Settings
-    scsi_controller = "virtio-scsi-pci"
-
-    disks {
-        disk_size         = "25G"
-        format            = "qcow2"
-        storage_pool      = ${local.disk_storage}
-        type              = "virtio"
-    }
-
-    # VM CPU Settings
-    cores = "1"
-
-    # VM Memory Settings
-    memory = "2048"
-
-    # VM Network Settings
-    network_adapters {
-        model    = "virtio"
-        bridge   = "vmbr0"
-        firewall = "false"
-    }
-
-    # VM Cloud-Init Settings
-    cloud_init              = true
-    cloud_init_storage_pool = ${local.disk_storage}
-
-    # PACKER Boot Commands
-    boot         = "c"
-    boot_wait    = "5s"
-    boot_command = [
-        "<esc><wait><esc><wait>",
-        "<f6><wait><esc><wait>",
-        "<bs><bs><bs><bs><bs>",
-        "autoinstall ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ ",
-        "--- <enter>"
-    ]
-    # Useful for debugging
-    # Sometimes lag will require this
-    # boot_key_interval = "500ms"
-
-    # PACKER Autoinstall Settings
-    http_directory = "http"
-    # (Optional) Bind IP Address and Port
-    # http_bind_address = "0.0.0.0"
-    # http_port_min     = 8802
-    # http_port_max     = 8802
-
-    ssh_username = "your-user-name"
-
-    # (Option 1) Add your Password here
-    # ssh_password = "your-password"
-    # - or -
-    # (Option 2) Add your Private SSH KEY file here
-    # ssh_private_key_file = "~/.ssh/id_rsa"
-
-    # Raise the timeout, when installation takes longer
-    ssh_timeout = "20m"
-}
-
-# Build Definition to create the VM Template
-build {
-
-    name    = "ubuntu-server-focal"
-    sources = ["source.proxmox.ubuntu-server-focal"]
-
-    # Provisioning the VM Template for Cloud-Init Integration in Proxmox #1
-    provisioner "shell" {
-        inline = [
-            "while [ ! -f /var/lib/cloud/instance/boot-finished ]; do echo 'Waiting for cloud-init...'; sleep 1; done",
-            "sudo rm /etc/ssh/ssh_host_*",
-            "sudo truncate -s 0 /etc/machine-id",
-            "sudo apt -y autoremove --purge",
-            "sudo apt -y clean",
-            "sudo apt -y autoclean",
-            "sudo cloud-init clean",
-            "sudo rm -f /etc/cloud/cloud.cfg.d/subiquity-disable-cloudinit-networking.cfg",
-            "sudo sync"
-        ]
-    }
-
-    # Provisioning the VM Template for Cloud-Init Integration in Proxmox #2
-    provisioner "file" {
-        source      = "files/99-pve.cfg"
-        destination = "/tmp/99-pve.cfg"
-    }
-
-    # Provisioning the VM Template for Cloud-Init Integration in Proxmox #3
-    provisioner "shell" {
-        inline = [ "sudo cp /tmp/99-pve.cfg /etc/cloud/cloud.cfg.d/99-pve.cfg" ]
-    }
-
-    # Add additional provisioning scripts here
-    # ...
-}

+ 0 - 1
library/packer/proxmox/ubuntu-server-jammy-docker/files/99-pve.cfg

@@ -1 +0,0 @@
-datasource_list: [ConfigDrive, NoCloud]

+ 0 - 1
library/packer/proxmox/ubuntu-server-jammy-docker/http/meta-data

@@ -1 +0,0 @@
-

+ 0 - 33
library/packer/proxmox/ubuntu-server-jammy-docker/http/user-data

@@ -1,33 +0,0 @@
-#cloud-config
-autoinstall:
-  version: 1
-  locale: en_US
-  keyboard:
-    layout: de
-  ssh:
-    install-server: true
-    allow-pw: true
-    disable_root: true
-    ssh_quiet_keygen: true
-    allow_public_ssh_keys: true
-  packages:
-    - qemu-guest-agent
-    - sudo
-  storage:
-    layout:
-      name: direct
-    swap:
-      size: 0
-  user-data:
-    package_upgrade: false
-    timezone: Europe/Berlin
-    users:
-      - name: your-user-name
-        groups: [adm, sudo]
-        lock-passwd: false
-        sudo: ALL=(ALL) NOPASSWD:ALL
-        shell: /bin/bash
-        # passwd: your-password
-        # - or -
-        # ssh_authorized_keys:
-        #   - your-ssh-key

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini