mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-11-03 19:58:14 +00:00 
			
		
		
		
	Optimized portfolio and pkgmgr update procedures
This commit is contained in:
		@@ -706,7 +706,7 @@ defaults_applications:
 | 
			
		||||
  ## Presentation
 | 
			
		||||
  presentation:
 | 
			
		||||
    matomo_tracking_enabled:      "{{matomo_tracking_enabled_default}}"     # Enables\Disables Matomo Tracking
 | 
			
		||||
    css_enabled:                  "{{css_enabled_default}}"                 # Enables\Disables Global CSS Style
 | 
			
		||||
    css_enabled:                  False                                     # Would mess with the presentation layout
 | 
			
		||||
    landingpage_iframe_enabled:   False                                     # Makes sense to make the documentary allways in iframe available
 | 
			
		||||
 | 
			
		||||
  # Snipe-IT
 | 
			
		||||
 
 | 
			
		||||
@@ -22,6 +22,3 @@ galaxy_info:
 | 
			
		||||
  repository: "https://s.veen.world/cymais"
 | 
			
		||||
  issue_tracker_url: "https://s.veen.world/cymaisissues"
 | 
			
		||||
  documentation: "https://s.veen.world/cymais"
 | 
			
		||||
 | 
			
		||||
dependencies:
 | 
			
		||||
  - package-manager
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,8 @@
 | 
			
		||||
- name: install directory-validator
 | 
			
		||||
  command:
 | 
			
		||||
    cmd: "pkgmgr install directory-validator --clone-mode https"
 | 
			
		||||
- name: "{{ role_name }} | pkgmgr install"
 | 
			
		||||
  include_role:
 | 
			
		||||
    name: pkgmgr-install
 | 
			
		||||
  vars:
 | 
			
		||||
    package_name: directory-validator
 | 
			
		||||
  when: run_once_backup_directory_validator is not defined
 | 
			
		||||
 | 
			
		||||
- name: run the backup_directory_validator tasks once
 | 
			
		||||
 
 | 
			
		||||
@@ -28,4 +28,3 @@ dependencies:
 | 
			
		||||
  - cleanup-failed-docker-backups
 | 
			
		||||
  - system-maintenance-lock
 | 
			
		||||
  - backup-directory-validator
 | 
			
		||||
  - package-manager
 | 
			
		||||
@@ -1,6 +1,8 @@
 | 
			
		||||
- name: install backup-docker-to-local
 | 
			
		||||
  command:
 | 
			
		||||
    cmd: "pkgmgr install backup-docker-to-local --clone-mode https"
 | 
			
		||||
- name: "{{ role_name }} | pkgmgr install"
 | 
			
		||||
  include_role:
 | 
			
		||||
    name: pkgmgr-install
 | 
			
		||||
  vars:
 | 
			
		||||
    package_name: backup-docker-to-local
 | 
			
		||||
  when: run_once_backup_docker_to_local is not defined
 | 
			
		||||
 | 
			
		||||
- name: Retrieve backup-docker-to-local path from pkgmgr
 | 
			
		||||
 
 | 
			
		||||
@@ -23,6 +23,3 @@ galaxy_info:
 | 
			
		||||
  repository: "https://github.com/kevinveenbirkenbach/docker-volume-cleaner"
 | 
			
		||||
  issue_tracker_url: "https://github.com/kevinveenbirkenbach/docker-volume-cleaner/issues"
 | 
			
		||||
  documentation: "https://github.com/kevinveenbirkenbach/docker-volume-cleaner#readme"
 | 
			
		||||
 | 
			
		||||
dependencies:
 | 
			
		||||
  - package-manager
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,8 @@
 | 
			
		||||
- name: install dockreap
 | 
			
		||||
  command:
 | 
			
		||||
    cmd: "pkgmgr install dockreap"
 | 
			
		||||
- name: "{{ role_name }} | pkgmgr install"
 | 
			
		||||
  include_role:
 | 
			
		||||
    name: pkgmgr-install
 | 
			
		||||
  vars:
 | 
			
		||||
    package_name: dockreap
 | 
			
		||||
  when: run_once_cleanup_docker_anonymous_volumes is not defined
 | 
			
		||||
 | 
			
		||||
- name: run dockreap with --no-confirmation
 | 
			
		||||
 
 | 
			
		||||
@@ -25,4 +25,3 @@ dependencies:
 | 
			
		||||
  - systemd-notifier
 | 
			
		||||
  - system-maintenance-lock
 | 
			
		||||
  - backup-directory-validator
 | 
			
		||||
  - package-manager
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,8 @@
 | 
			
		||||
- name: install cleanup-failed-docker-backups
 | 
			
		||||
  command:
 | 
			
		||||
    cmd: "pkgmgr install cleanup-failed-docker-backups --clone-mode https"
 | 
			
		||||
- name: "{{ role_name }} | pkgmgr install"
 | 
			
		||||
  include_role:
 | 
			
		||||
    name: pkgmgr-install
 | 
			
		||||
  vars:
 | 
			
		||||
    package_name: cleanup-failed-docker-backups 
 | 
			
		||||
  when: run_once_cleanup_failed_docker_backups is not defined
 | 
			
		||||
 | 
			
		||||
- name: Retrieve backup-docker-to-local path from pkgmgr
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@ The purpose of this role is to automate the installation and configuration of Gi
 | 
			
		||||
- **Automated Git Installation:** Installs Git using Pacman.
 | 
			
		||||
- **Custom Git Configuration:** Invokes the git-configurator tool to merge user-specific configuration options.
 | 
			
		||||
- **Idempotent Task Execution:** Uses host-level run-once artifacts to ensure that configuration tasks are executed only once per host.
 | 
			
		||||
- **Integration:** Works alongside the package-manager role to streamline overall system setup.
 | 
			
		||||
- **Integration:** Works alongside the pkgmgr role to streamline overall system setup.
 | 
			
		||||
 | 
			
		||||
## Credits
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -18,5 +18,3 @@ galaxy_info:
 | 
			
		||||
    - configuration
 | 
			
		||||
    - pacman
 | 
			
		||||
    - personal-computer
 | 
			
		||||
dependencies:
 | 
			
		||||
  - package-manager
 | 
			
		||||
@@ -4,11 +4,11 @@
 | 
			
		||||
    state: present
 | 
			
		||||
  become: true
 | 
			
		||||
 | 
			
		||||
- name: install gitconfig
 | 
			
		||||
  command:
 | 
			
		||||
    cmd: "pkgmgr install gitconfig --clone-mode https"
 | 
			
		||||
  when: run_once_gitconfig is not defined
 | 
			
		||||
  become: true
 | 
			
		||||
- name: "{{ role_name }} | pkgmgr install"
 | 
			
		||||
  include_role:
 | 
			
		||||
    name: pkgmgr-install
 | 
			
		||||
  vars:
 | 
			
		||||
    package_name: gitconfig
 | 
			
		||||
 | 
			
		||||
- name: setup git
 | 
			
		||||
  command: gitconfig --merge-option rebase --name "{{users.client.full_name}}" --email "{{users.client.email}}" --website "{{users.client.website}}" --signing gpg --gpg-key "{{users.client.gpg}}"
 | 
			
		||||
 
 | 
			
		||||
@@ -17,5 +17,3 @@ galaxy_info:
 | 
			
		||||
    - gnome
 | 
			
		||||
    - extensions
 | 
			
		||||
    - automation
 | 
			
		||||
dependencies:
 | 
			
		||||
  - package-manager
 | 
			
		||||
 
 | 
			
		||||
@@ -2,10 +2,11 @@
 | 
			
		||||
  ansible.builtin.shell: gsettings set org.gnome.shell disable-user-extensions false
 | 
			
		||||
  become: false
 | 
			
		||||
 | 
			
		||||
- name: install cli-gnome-extension-manager
 | 
			
		||||
  command:
 | 
			
		||||
    cmd: "pkgmgr install cli-gnome-extension-manager --clone-mode https"
 | 
			
		||||
  become: false
 | 
			
		||||
- name: "{{ role_name }} | pkgmgr install"
 | 
			
		||||
  include_role:
 | 
			
		||||
    name: pkgmgr-install
 | 
			
		||||
  vars:
 | 
			
		||||
    package_name: cli-gnome-extension-manager
 | 
			
		||||
 | 
			
		||||
- name: Execute CLI GNOME Extension manager script
 | 
			
		||||
  ansible.builtin.shell: cli-gnome-extension-manager "{{ item[0] }}" "{{ item[1] }}" "{{ item[2] }}"
 | 
			
		||||
 
 | 
			
		||||
@@ -73,6 +73,11 @@ class LookupModule(LookupBase):
 | 
			
		||||
                    meta_data = yaml.safe_load(f)
 | 
			
		||||
 | 
			
		||||
                galaxy_info = meta_data.get("galaxy_info", {})
 | 
			
		||||
                
 | 
			
		||||
                # If display is set to False ignore it
 | 
			
		||||
                if not galaxy_info.get("display", True):
 | 
			
		||||
                    continue
 | 
			
		||||
                
 | 
			
		||||
                description = galaxy_info.get("description", "")
 | 
			
		||||
                logo = galaxy_info.get("logo", {})
 | 
			
		||||
                icon_class = logo.get("class", "fa-solid fa-cube")
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,38 @@
 | 
			
		||||
from __future__ import (absolute_import, division, print_function)
 | 
			
		||||
__metaclass__ = type
 | 
			
		||||
 | 
			
		||||
from ansible.plugins.lookup import LookupBase
 | 
			
		||||
from ansible.errors import AnsibleError
 | 
			
		||||
 | 
			
		||||
class LookupModule(LookupBase):
 | 
			
		||||
    def run(self, terms, variables=None, **kwargs):
 | 
			
		||||
        """
 | 
			
		||||
        Group the given cards into categorized and uncategorized lists
 | 
			
		||||
        based on the tags from menu_categories.
 | 
			
		||||
        """
 | 
			
		||||
        if len(terms) < 1:
 | 
			
		||||
            raise AnsibleError("Missing required argument: cards")
 | 
			
		||||
 | 
			
		||||
        cards = terms[0]
 | 
			
		||||
        menu_categories = variables.get("menu_categories", {})
 | 
			
		||||
 | 
			
		||||
        categorized = {}
 | 
			
		||||
        uncategorized = []
 | 
			
		||||
 | 
			
		||||
        for card in cards:
 | 
			
		||||
            found = False
 | 
			
		||||
            for category, data in menu_categories.items():
 | 
			
		||||
                if any(tag in data.get('tags', []) for tag in card.get('tags', [])):
 | 
			
		||||
                    categorized.setdefault(category, []).append(card)
 | 
			
		||||
                    found = True
 | 
			
		||||
                    break
 | 
			
		||||
            if not found:
 | 
			
		||||
                uncategorized.append(card)
 | 
			
		||||
 | 
			
		||||
        return [
 | 
			
		||||
            {
 | 
			
		||||
                'categorized': categorized,
 | 
			
		||||
                'uncategorized': uncategorized,
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
 | 
			
		||||
@@ -21,6 +21,22 @@
 | 
			
		||||
  become: false
 | 
			
		||||
  register: config_file
 | 
			
		||||
 | 
			
		||||
- name: Load docker cards
 | 
			
		||||
  set_fact:
 | 
			
		||||
    portfolio_cards: "{{ lookup('docker_cards', 'roles') }}"
 | 
			
		||||
 | 
			
		||||
- name: Group docker cards
 | 
			
		||||
  set_fact:
 | 
			
		||||
    portfolio_menu_data: "{{ lookup('docker_cards_grouped', portfolio_cards) }}"
 | 
			
		||||
 | 
			
		||||
- name: Debug portfolio data
 | 
			
		||||
  debug:
 | 
			
		||||
    msg:
 | 
			
		||||
      cards: "{{ portfolio_cards }}"
 | 
			
		||||
      menu_data: "{{ portfolio_menu_data }}"
 | 
			
		||||
  when: enable_debug | bool
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
- name: Copy host-specific config.yaml if it exists
 | 
			
		||||
  template:
 | 
			
		||||
    src: "{{ config_inventory_path }}"
 | 
			
		||||
 
 | 
			
		||||
@@ -105,7 +105,7 @@ accounts:
 | 
			
		||||
  - link: navigation.header.contact
 | 
			
		||||
 | 
			
		||||
cards:
 | 
			
		||||
{{ lookup('docker_cards', 'roles') | to_nice_yaml(indent=2) }}
 | 
			
		||||
{{ portfolio_cards | to_nice_yaml(indent=2) }}
 | 
			
		||||
 | 
			
		||||
platform:
 | 
			
		||||
  titel:    {{service_provider.platform.titel}}
 | 
			
		||||
@@ -166,248 +166,13 @@ navigation:
 | 
			
		||||
  footer:
 | 
			
		||||
    children:
 | 
			
		||||
    - link: accounts
 | 
			
		||||
 | 
			
		||||
{% if ["discourse","moodle","listmonk","openproject","taiga","snipe_it","matrix","bigbluebutton","mailu", "matomo","phpmyadmin","keycloak", "ldap", "baserow","yourls","nextcloud"] | any_in(group_names) %}
 | 
			
		||||
 | 
			
		||||
    - name: Solution Hub
 | 
			
		||||
      description: Curated collection of self hosted tools
 | 
			
		||||
      icon:
 | 
			
		||||
          class: fa-solid fa-network-wired
 | 
			
		||||
      children:
 | 
			
		||||
 | 
			
		||||
  {% if ["discourse","moodle","listmonk"] | any_in(group_names) %}
 | 
			
		||||
 | 
			
		||||
      - name: Community
 | 
			
		||||
        description: Tools to manage the community
 | 
			
		||||
        icon:
 | 
			
		||||
            class: fa-solid fa-users
 | 
			
		||||
        children:
 | 
			
		||||
 | 
			
		||||
    {% if "discourse" in group_names %}
 | 
			
		||||
 | 
			
		||||
        - name: Forum
 | 
			
		||||
          description: Join the discussion
 | 
			
		||||
          icon:
 | 
			
		||||
            class: fa-brands fa-discourse
 | 
			
		||||
          url: https://{{domains.discourse}}/
 | 
			
		||||
          iframe: {{ applications | get_landingpage_iframe_enabled('discourse') }}
 | 
			
		||||
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {% if "moodle" in group_names %}
 | 
			
		||||
        
 | 
			
		||||
        - name: Learning Platform
 | 
			
		||||
          description: Learn with {{ 'our' if service_provider.type == 'legal' else 'my' }} academy
 | 
			
		||||
          icon:
 | 
			
		||||
            class: fa-solid fa-graduation-cap
 | 
			
		||||
          url: https://{{domains.moodle}}/
 | 
			
		||||
          iframe: {{ applications | get_landingpage_iframe_enabled('moodle') }}
 | 
			
		||||
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {% if "listmonk" in group_names %}
 | 
			
		||||
 | 
			
		||||
        - name: Newsletter
 | 
			
		||||
          description: Subscribe to {{ 'our' if service_provider.type == 'legal' else 'my' }} newsletter
 | 
			
		||||
          icon:
 | 
			
		||||
            class: fa-solid fa-envelope-open-text
 | 
			
		||||
          url: https://{{domains.listmonk}}/subscription/form
 | 
			
		||||
          iframe: {{ applications | get_landingpage_iframe_enabled('listmonk') }}
 | 
			
		||||
 | 
			
		||||
    {% endif %}
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% if ["openproject","taiga","snipe_it"] | any_in(group_names) %}
 | 
			
		||||
 | 
			
		||||
      - name: Project Management
 | 
			
		||||
        description: Project Management Tools
 | 
			
		||||
        icon:
 | 
			
		||||
            class: fa-solid fa-chart-line
 | 
			
		||||
        children:
 | 
			
		||||
 | 
			
		||||
    {% if "openproject" in group_names %}
 | 
			
		||||
 | 
			
		||||
        - name: Open Project
 | 
			
		||||
          description: Explore {{ 'our' if service_provider.type == 'legal' else 'my' }} projects
 | 
			
		||||
          icon:
 | 
			
		||||
            class: fa-solid fa-tasks
 | 
			
		||||
          url: https://{{domains.openproject}}/
 | 
			
		||||
          iframe: {{ applications | get_landingpage_iframe_enabled('openproject') }}
 | 
			
		||||
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {% if "taiga" in group_names %}       
 | 
			
		||||
 | 
			
		||||
        - name: Taiga
 | 
			
		||||
          description: View {{ 'our' if service_provider.type == 'legal' else 'my' }} Kanban board
 | 
			
		||||
          icon:
 | 
			
		||||
            class: bi bi-clipboard2-check-fill
 | 
			
		||||
          url: https://{{domains.taiga}}/
 | 
			
		||||
          iframe: {{ applications | get_landingpage_iframe_enabled('taiga') }}
 | 
			
		||||
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {% if "snipe_it" in group_names %}        
 | 
			
		||||
 | 
			
		||||
        - name: Snipe IT
 | 
			
		||||
          description: Manage {{ 'our' if service_provider.type == 'legal' else 'my' }} inventory
 | 
			
		||||
          icon:
 | 
			
		||||
            class: fas fa-box-open
 | 
			
		||||
          url: https://{{domains.snipe_it}}/
 | 
			
		||||
          iframe: {{ applications | get_landingpage_iframe_enabled('snipe_it') }}
 | 
			
		||||
 | 
			
		||||
    {% endif %}
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% if ["matrix","bigbluebutton","mailu"] | any_in(group_names) %}  
 | 
			
		||||
 | 
			
		||||
      - name: Communication
 | 
			
		||||
        icon:
 | 
			
		||||
          class: fa-solid fa-comments
 | 
			
		||||
        children:
 | 
			
		||||
 | 
			
		||||
    {% if "matrix" in group_names %}   
 | 
			
		||||
 | 
			
		||||
        - name: Elements
 | 
			
		||||
          description: Chat with the world
 | 
			
		||||
          icon:
 | 
			
		||||
            class: fa-solid fa-comment
 | 
			
		||||
          url: https://{{domains.matrix_element}}/
 | 
			
		||||
          iframe: {{ applications | get_landingpage_iframe_enabled('matrix') }}
 | 
			
		||||
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {% if "bigbluebutton" in group_names %}             
 | 
			
		||||
 | 
			
		||||
        - name: Big Blue Button
 | 
			
		||||
          description: Join live events
 | 
			
		||||
          icon:
 | 
			
		||||
            class: fa-solid fa-video
 | 
			
		||||
          url: https://{{domains.bigbluebutton}}/
 | 
			
		||||
          iframe: {{ applications | get_landingpage_iframe_enabled('bigbluebutton') }}
 | 
			
		||||
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {% if "mailu" in group_names %}            
 | 
			
		||||
 | 
			
		||||
        - name: Mailu
 | 
			
		||||
          description: Send{{ 'our' if service_provider.type == 'legal' else 'my' }}a mail
 | 
			
		||||
          icon:
 | 
			
		||||
            class: fa-solid fa-envelope
 | 
			
		||||
          url: https://{{domains.mailu}}/
 | 
			
		||||
          iframe: {{ applications | get_landingpage_iframe_enabled('mailu') }}
 | 
			
		||||
 | 
			
		||||
    {% endif %}
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% if ["matomo","phpmyadmin","keycloak", "ldap"] | any_in(group_names) %}  
 | 
			
		||||
 | 
			
		||||
      - name: Administration
 | 
			
		||||
        icon:
 | 
			
		||||
          class: fas fa-building
 | 
			
		||||
        children:
 | 
			
		||||
 | 
			
		||||
    {% if "matomo" in group_names %}   
 | 
			
		||||
 | 
			
		||||
        - name: Matomo
 | 
			
		||||
          description: Analyze with Matomo
 | 
			
		||||
          icon:
 | 
			
		||||
            class: fa-solid fa-chart-simple
 | 
			
		||||
          url: https://{{domains.matomo}}/
 | 
			
		||||
          iframe: {{ applications | get_landingpage_iframe_enabled('matomo') }}
 | 
			
		||||
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {% if "phpmyadmin" in group_names %}   
 | 
			
		||||
 | 
			
		||||
        - name: phpMyAdmin
 | 
			
		||||
          description: Administrate MySQL and MariaDB databases
 | 
			
		||||
          icon:
 | 
			
		||||
            class: fas fa-database
 | 
			
		||||
          url: https://{{domains.phpmyadmin}}/
 | 
			
		||||
          iframe: {{ applications | get_landingpage_iframe_enabled('phpmyadmin') }}
 | 
			
		||||
 | 
			
		||||
    {% endif %}
 | 
			
		||||
 | 
			
		||||
    {% if "pgadmin" in group_names %}   
 | 
			
		||||
 | 
			
		||||
        - name: pgAdmin
 | 
			
		||||
          description: Administrate PostgreSQL databases with ease and precision
 | 
			
		||||
          icon:
 | 
			
		||||
            class: fas fa-database
 | 
			
		||||
          url: https://{{domains.pgadmin}}/
 | 
			
		||||
          iframe: {{ applications | get_landingpage_iframe_enabled('pgadmin') }}
 | 
			
		||||
 | 
			
		||||
    {% endif %}
 | 
			
		||||
 | 
			
		||||
    {% if "keycloak" in group_names %}   
 | 
			
		||||
 | 
			
		||||
        - name: Keycloak
 | 
			
		||||
          description: Manage User via Keycloak
 | 
			
		||||
          icon:
 | 
			
		||||
            class: fas fa-user-shield
 | 
			
		||||
          iframe: {{ applications | get_landingpage_iframe_enabled('keycloak') }}
 | 
			
		||||
          children:
 | 
			
		||||
          - name: Administration
 | 
			
		||||
            description: Access the central admin console
 | 
			
		||||
            icon:
 | 
			
		||||
              class: fa-solid fa-shield-halved
 | 
			
		||||
            url: https://{{domains.keycloak}}/admin
 | 
			
		||||
            iframe: {{ applications | get_landingpage_iframe_enabled('keycloak') }}
 | 
			
		||||
          - name: Profile
 | 
			
		||||
            description: Update your personal admin settings
 | 
			
		||||
            icon:
 | 
			
		||||
              class: fa-solid fa-user-gear
 | 
			
		||||
            url: https://{{ domains.keycloak }}/realms/{{oidc.client.id}}/account
 | 
			
		||||
            iframe: {{ applications | get_landingpage_iframe_enabled('keycloak') }}
 | 
			
		||||
          - name: Logout
 | 
			
		||||
            description: End your admin session securely
 | 
			
		||||
            icon:
 | 
			
		||||
              class: fa-solid fa-right-from-bracket
 | 
			
		||||
            url: https://{{ domains.keycloak }}/realms/{{oidc.client.id}}/protocol/openid-connect/logout
 | 
			
		||||
            iframe: false
 | 
			
		||||
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {% if "ldap" in group_names %}   
 | 
			
		||||
 | 
			
		||||
        - name: LDAP
 | 
			
		||||
          description: Manage LDAP
 | 
			
		||||
          icon:
 | 
			
		||||
            class: fas fa-key
 | 
			
		||||
          url: https://{{domains.ldap}}/
 | 
			
		||||
          iframe: {{ applications | get_landingpage_iframe_enabled('ldap') }}
 | 
			
		||||
 | 
			
		||||
    {% endif %}
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% if ["baserow","yourls","nextcloud"] | any_in(group_names) %}
 | 
			
		||||
 | 
			
		||||
      - name: Tools
 | 
			
		||||
        icon:
 | 
			
		||||
          class: fas fa-tools
 | 
			
		||||
        children:
 | 
			
		||||
 | 
			
		||||
    {% if "baserow" in group_names %}
 | 
			
		||||
 | 
			
		||||
        - name: Baserow
 | 
			
		||||
          description: Organize with Baserow
 | 
			
		||||
          icon:
 | 
			
		||||
            class: fa-solid fa-table
 | 
			
		||||
          url: https://{{domains.baserow}}/
 | 
			
		||||
          iframe: {{ applications | get_landingpage_iframe_enabled('baserow') }}  
 | 
			
		||||
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {% if "yourls" in group_names %}   
 | 
			
		||||
 | 
			
		||||
        - name: Yourls
 | 
			
		||||
          description: Create Shortlinks
 | 
			
		||||
          icon:
 | 
			
		||||
            class: bi bi-link
 | 
			
		||||
          url: https://{{domains.yourls}}/admin/
 | 
			
		||||
          iframe: {{ applications | get_landingpage_iframe_enabled('yourls') }}
 | 
			
		||||
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {% if "nextcloud" in group_names %}
 | 
			
		||||
 | 
			
		||||
        - name: Nextcloud
 | 
			
		||||
          description: Access your cloud storage
 | 
			
		||||
          icon:
 | 
			
		||||
            class: fa-solid fa-cloud
 | 
			
		||||
          url: https://{{domains.nextcloud}}/
 | 
			
		||||
          iframe: {{ applications | get_landingpage_iframe_enabled('nextcloud') }}
 | 
			
		||||
 | 
			
		||||
    {% endif %}
 | 
			
		||||
  {% endif %}
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% include 'footer_menu.yaml.j2' %}
 | 
			
		||||
    
 | 
			
		||||
    - name: Support Us
 | 
			
		||||
      description: "Discover all the ways you can support our work."
 | 
			
		||||
@@ -444,6 +209,17 @@ navigation:
 | 
			
		||||
      url: https://{{domains.sphinx}}
 | 
			
		||||
      iframe: {{ applications | get_landingpage_iframe_enabled('sphinx') }}
 | 
			
		||||
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
{% if "presentation" in group_names %}   
 | 
			
		||||
 | 
			
		||||
    - name: Slides
 | 
			
		||||
      description: Access our comprehensive documentation and support resources to help you get the most out of the software.
 | 
			
		||||
      icon:
 | 
			
		||||
        class: fas fa-book
 | 
			
		||||
      url: https://{{domains.sphinx}}
 | 
			
		||||
      iframe: {{ applications | get_landingpage_iframe_enabled('sphinx') }}
 | 
			
		||||
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
    - name: Imprint
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										52
									
								
								roles/docker-portfolio/templates/footer_menu.yaml.j2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								roles/docker-portfolio/templates/footer_menu.yaml.j2
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,52 @@
 | 
			
		||||
{# Render all categories #}
 | 
			
		||||
{% for category, apps in portfolio_menu_data.categorized %}
 | 
			
		||||
    - name: {{ category }}
 | 
			
		||||
      description: {{ category_data.menu_categories[category].description }}
 | 
			
		||||
      icon:
 | 
			
		||||
        class: {{ category_data.menu_categories[category].icon }}
 | 
			
		||||
      children:
 | 
			
		||||
      {% for app in apps %}
 | 
			
		||||
        - name: {{ app.title }}
 | 
			
		||||
          description: {{ app.text }}
 | 
			
		||||
          icon: {{ app.icon }}
 | 
			
		||||
          url: {{ app.url }}
 | 
			
		||||
          iframe: {{ app.iframe }}
 | 
			
		||||
          {% if app.title == 'Keycloak' %}
 | 
			
		||||
          children:
 | 
			
		||||
            - name: Administration
 | 
			
		||||
              description: Access the central admin console
 | 
			
		||||
              icon:
 | 
			
		||||
                class: fa-solid fa-shield-halved
 | 
			
		||||
              url: https://{{domains.keycloak}}/admin
 | 
			
		||||
              iframe: {{ applications | get_landingpage_iframe_enabled('keycloak') }}
 | 
			
		||||
            - name: Profile
 | 
			
		||||
              description: Update your personal admin settings
 | 
			
		||||
              icon:
 | 
			
		||||
                class: fa-solid fa-user-gear
 | 
			
		||||
              url: https://{{ domains.keycloak }}/realms/{{oidc.client.id}}/account
 | 
			
		||||
              iframe: {{ applications | get_landingpage_iframe_enabled('keycloak') }}
 | 
			
		||||
            - name: Logout
 | 
			
		||||
              description: End your admin session securely
 | 
			
		||||
              icon:
 | 
			
		||||
                class: fa-solid fa-right-from-bracket
 | 
			
		||||
              url: https://{{ domains.keycloak }}/realms/{{oidc.client.id}}/protocol/openid-connect/logout
 | 
			
		||||
              iframe: false
 | 
			
		||||
          {% endif %}
 | 
			
		||||
      {% endfor %}
 | 
			
		||||
{% endfor %}
 | 
			
		||||
 | 
			
		||||
{# Render Uncategorized 
 | 
			
		||||
{% if portfolio_menu_data.uncategorized %}
 | 
			
		||||
    - name: Uncategorized
 | 
			
		||||
      description: Tools without a defined category
 | 
			
		||||
      icon:
 | 
			
		||||
        class: fa-solid fa-question
 | 
			
		||||
      children:
 | 
			
		||||
      {% for app in portfolio_menu_data.uncategorized %}
 | 
			
		||||
        - name: {{ app.title }}
 | 
			
		||||
          description: {{ app.text }}
 | 
			
		||||
          icon: {{ app.icon }}
 | 
			
		||||
          url: {{ app.url }}
 | 
			
		||||
          iframe: {{ app.iframe }}
 | 
			
		||||
      {% endfor %}
 | 
			
		||||
{% endif %} #}
 | 
			
		||||
							
								
								
									
										42
									
								
								roles/docker-portfolio/vars/menu_categories.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								roles/docker-portfolio/vars/menu_categories.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,42 @@
 | 
			
		||||
menu_categories:
 | 
			
		||||
  Community:
 | 
			
		||||
    description: Tools to manage the community
 | 
			
		||||
    icon: fa-solid fa-users
 | 
			
		||||
    tags:
 | 
			
		||||
      - community
 | 
			
		||||
      - forum
 | 
			
		||||
      - learning
 | 
			
		||||
      - newsletter
 | 
			
		||||
 | 
			
		||||
  Project Management:
 | 
			
		||||
    description: Project Management Tools
 | 
			
		||||
    icon: fa-solid fa-chart-line
 | 
			
		||||
    tags:
 | 
			
		||||
      - project
 | 
			
		||||
      - kanban
 | 
			
		||||
      - management
 | 
			
		||||
 | 
			
		||||
  Communication:
 | 
			
		||||
    description: Tools for communication
 | 
			
		||||
    icon: fa-solid fa-comments
 | 
			
		||||
    tags:
 | 
			
		||||
      - chat
 | 
			
		||||
      - communication
 | 
			
		||||
      - video
 | 
			
		||||
      - mail
 | 
			
		||||
 | 
			
		||||
  Administration:
 | 
			
		||||
    description: Administration Tools
 | 
			
		||||
    icon: fas fa-building
 | 
			
		||||
    tags:
 | 
			
		||||
      - administration
 | 
			
		||||
      - database
 | 
			
		||||
      - user-management
 | 
			
		||||
 | 
			
		||||
  Tools:
 | 
			
		||||
    description: Helpful Tools
 | 
			
		||||
    icon: fas fa-tools
 | 
			
		||||
    tags:
 | 
			
		||||
      - tools
 | 
			
		||||
      - utility
 | 
			
		||||
      - baserow
 | 
			
		||||
@@ -26,5 +26,3 @@ galaxy_info:
 | 
			
		||||
  documentation: "https://s.veen.world/cymais"
 | 
			
		||||
  logo:
 | 
			
		||||
    class: "fas fa-chalkboard-teacher"
 | 
			
		||||
dependencies:
 | 
			
		||||
  - package-manager
 | 
			
		||||
@@ -4,10 +4,12 @@
 | 
			
		||||
  include_role: 
 | 
			
		||||
    name: docker-compose
 | 
			
		||||
 | 
			
		||||
- name: install cymais-presentation
 | 
			
		||||
  command:
 | 
			
		||||
    cmd: "pkgmgr install cymais-presentation --clone-mode https"
 | 
			
		||||
  notify: docker compose project build and setup
 | 
			
		||||
- name: "{{ role_name }} | pkgmgr install"
 | 
			
		||||
  include_role:
 | 
			
		||||
    name: pkgmgr-install
 | 
			
		||||
  vars:
 | 
			
		||||
    package_name: cymais-presentation
 | 
			
		||||
    package_notify: docker compose project build and setup
 | 
			
		||||
 | 
			
		||||
- name: Get path of cymais-presentation using pkgmgr
 | 
			
		||||
  command: pkgmgr path cymais-presentation
 | 
			
		||||
 
 | 
			
		||||
@@ -27,5 +27,3 @@ galaxy_info:
 | 
			
		||||
  documentation: "https://s.veen.world/cymais"
 | 
			
		||||
  logo:
 | 
			
		||||
    class: "fa-solid fa-book"
 | 
			
		||||
dependencies:
 | 
			
		||||
  - package-manager
 | 
			
		||||
 
 | 
			
		||||
@@ -4,10 +4,12 @@
 | 
			
		||||
  include_role: 
 | 
			
		||||
    name: docker-compose
 | 
			
		||||
 | 
			
		||||
- name: install cymais-sphinx
 | 
			
		||||
  command:
 | 
			
		||||
    cmd: "pkgmgr install cymais-sphinx --clone-mode https"
 | 
			
		||||
  notify: docker compose project build and setup
 | 
			
		||||
- name: "{{ role_name }} | pkgmgr install"
 | 
			
		||||
  include_role:
 | 
			
		||||
    name: pkgmgr-install
 | 
			
		||||
  vars:
 | 
			
		||||
    package_name: cymais-sphinx
 | 
			
		||||
    package_notify: docker compose project build and setup
 | 
			
		||||
 | 
			
		||||
- name: Get path of cymais-sphinx using pkgmgr
 | 
			
		||||
  command: pkgmgr path cymais-sphinx
 | 
			
		||||
 
 | 
			
		||||
@@ -23,5 +23,3 @@ galaxy_info:
 | 
			
		||||
  repository: https://s.veen.world/cymais
 | 
			
		||||
  issue_tracker_url: https://s.veen.world/cymaisissues
 | 
			
		||||
  documentation: https://s.veen.world/cymais
 | 
			
		||||
dependencies:
 | 
			
		||||
  - role: package-manager
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,9 @@
 | 
			
		||||
---
 | 
			
		||||
- name: install setup-hibernate
 | 
			
		||||
  command:
 | 
			
		||||
    cmd: "pkgmgr install setup-hibernate --clone-mode https"
 | 
			
		||||
  become: true
 | 
			
		||||
- name: "{{ role_name }} | pkgmgr install"
 | 
			
		||||
  include_role:
 | 
			
		||||
    name: pkgmgr-install
 | 
			
		||||
  vars:
 | 
			
		||||
    package_name: setup-hibernate
 | 
			
		||||
 | 
			
		||||
- name: Setup hibernate
 | 
			
		||||
  command: setup-hibernate --non-interactive
 | 
			
		||||
 
 | 
			
		||||
@@ -25,4 +25,4 @@ galaxy_info:
 | 
			
		||||
  documentation: https://s.veen.world/cymais
 | 
			
		||||
dependencies:
 | 
			
		||||
  - persona-administrator
 | 
			
		||||
  - package-manager
 | 
			
		||||
  - pkgmgr
 | 
			
		||||
							
								
								
									
										47
									
								
								roles/pkgmgr-install/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								roles/pkgmgr-install/README.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,47 @@
 | 
			
		||||
# Package Manager Installation 📦
 | 
			
		||||
 | 
			
		||||
## Description
 | 
			
		||||
 | 
			
		||||
This Ansible role installs and updates packages using `pkgmgr` on Arch Linux systems. It provides a unified interface for package installation and update management, ensuring consistent deployment across environments.
 | 
			
		||||
 | 
			
		||||
## Overview
 | 
			
		||||
 | 
			
		||||
The role abstracts package management operations using `pkgmgr`. It ensures the package manager itself is updated once per run and provides idempotent installation and update routines for specified packages.
 | 
			
		||||
 | 
			
		||||
## Purpose
 | 
			
		||||
 | 
			
		||||
The purpose of this role is to automate the installation and update process for CyMaIS-related applications or other managed packages using `pkgmgr`. It simplifies package handling and enforces best practices for package deployment in automated environments.
 | 
			
		||||
 | 
			
		||||
## Features
 | 
			
		||||
 | 
			
		||||
- **Automatic pkgmgr Update:** Ensures the package manager is always up-to-date.
 | 
			
		||||
- **Idempotent Package Installation:** Only installs packages when necessary.
 | 
			
		||||
- **Flexible Notification:** Supports handler notification for post-install actions (e.g., Docker Compose builds).
 | 
			
		||||
- **Optional Privilege Escalation:** Controlled via the `pkgmgr_become` variable (default: `true`).
 | 
			
		||||
 | 
			
		||||
## Role Variables
 | 
			
		||||
 | 
			
		||||
| Name            | Description                                                     | Default |
 | 
			
		||||
|-----------------|-----------------------------------------------------------------|---------|
 | 
			
		||||
| `package_name`   | Name of the package to install/update                          | (required) |
 | 
			
		||||
| `package_notify` | Handler to notify on package installation/update              | "" |
 | 
			
		||||
| `pkgmgr_become`  | Execute all tasks with elevated privileges (become: true/false) | true |
 | 
			
		||||
 | 
			
		||||
## Example Usage
 | 
			
		||||
 | 
			
		||||
```yaml
 | 
			
		||||
- name: Install cymais-presentation
 | 
			
		||||
  include_role:
 | 
			
		||||
    name: pkgmgr-install
 | 
			
		||||
  vars:
 | 
			
		||||
    package_name: cymais-presentation
 | 
			
		||||
    package_notify: docker compose project build and setup
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Credits 📝
 | 
			
		||||
 | 
			
		||||
Developed and maintained by **Kevin Veen-Birkenbach**.  
 | 
			
		||||
Learn more at [www.veen.world](https://www.veen.world)
 | 
			
		||||
 | 
			
		||||
Part of the [CyMaIS Project](https://github.com/kevinveenbirkenbach/cymais)  
 | 
			
		||||
License: [CyMaIS NonCommercial License (CNCL)](https://s.veen.world/cncl)
 | 
			
		||||
							
								
								
									
										2
									
								
								roles/pkgmgr-install/defaults/main.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								roles/pkgmgr-install/defaults/main.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
---
 | 
			
		||||
pkgmgr_become: true
 | 
			
		||||
							
								
								
									
										25
									
								
								roles/pkgmgr-install/meta/main.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								roles/pkgmgr-install/meta/main.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
galaxy_info:
 | 
			
		||||
  author: "Kevin Veen-Birkenbach"
 | 
			
		||||
  description: "Installs and updates packages using pkgmgr."
 | 
			
		||||
  license: "CyMaIS NonCommercial License (CNCL)"
 | 
			
		||||
  license_url: "https://s.veen.world/cncl"
 | 
			
		||||
  company: | 
 | 
			
		||||
    Kevin Veen-Birkenbach
 | 
			
		||||
    Consulting & Coaching Solutions
 | 
			
		||||
    https://www.veen.world
 | 
			
		||||
  min_ansible_version: "2.9"
 | 
			
		||||
  platforms:
 | 
			
		||||
    - name: Archlinux
 | 
			
		||||
      versions:
 | 
			
		||||
        - rolling
 | 
			
		||||
  galaxy_tags:
 | 
			
		||||
    - pkgmgr
 | 
			
		||||
    - package
 | 
			
		||||
    - update
 | 
			
		||||
    - archlinux
 | 
			
		||||
    - cymais
 | 
			
		||||
  repository: https://s.veen.world/cymais
 | 
			
		||||
  issue_tracker_url: https://s.veen.world/cymaisissues
 | 
			
		||||
  documentation: https://s.veen.world/cymais
 | 
			
		||||
dependencies:
 | 
			
		||||
  - pkgmgr
 | 
			
		||||
							
								
								
									
										22
									
								
								roles/pkgmgr-install/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								roles/pkgmgr-install/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
- name: "{{ role_name }} | pkgmgr installation tasks"
 | 
			
		||||
  become: "{{ pkgmgr_become }}"
 | 
			
		||||
  block:
 | 
			
		||||
    - name: update pkgmgr
 | 
			
		||||
      command:
 | 
			
		||||
        cmd: "pkgmgr update pkgmgr"
 | 
			
		||||
      when: run_once_pkgmgr_update is not defined
 | 
			
		||||
 | 
			
		||||
    - name: install {{ package_name }}
 | 
			
		||||
      command:
 | 
			
		||||
        cmd: "pkgmgr install {{ package_name }} --clone-mode https"
 | 
			
		||||
      notify: "{{ package_notify | default(omit) }}"
 | 
			
		||||
 | 
			
		||||
    - name: update {{ package_name }}
 | 
			
		||||
      command:
 | 
			
		||||
        cmd: "pkgmgr update {{ package_name }}"
 | 
			
		||||
      notify: "{{ package_notify | default(omit) }}"
 | 
			
		||||
 | 
			
		||||
    - name: mark pkgmgr update as done
 | 
			
		||||
      set_fact:
 | 
			
		||||
        run_once_pkgmgr_update: true
 | 
			
		||||
      when: run_once_pkgmgr_update is not defined
 | 
			
		||||
@@ -24,7 +24,7 @@ galaxy_info:
 | 
			
		||||
      versions:
 | 
			
		||||
        - rolling
 | 
			
		||||
  galaxy_tags:
 | 
			
		||||
    - package-manager
 | 
			
		||||
    - pkgmgr
 | 
			
		||||
    - automation
 | 
			
		||||
    - git
 | 
			
		||||
    - repositories
 | 
			
		||||
@@ -22,5 +22,4 @@ galaxy_info:
 | 
			
		||||
  issue_tracker_url: "https://s.veen.world/cymaisissues"
 | 
			
		||||
  documentation: "https://s.veen.world/cymais"
 | 
			
		||||
dependencies:
 | 
			
		||||
  - package-manager
 | 
			
		||||
  - systemd-notifier
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,8 @@
 | 
			
		||||
- name: install btrfs-auto-balancer
 | 
			
		||||
  command:
 | 
			
		||||
    cmd: "pkgmgr install btrfs-auto-balancer --clone-mode https"
 | 
			
		||||
- name: "{{ role_name }} | pkgmgr install"
 | 
			
		||||
  include_role:
 | 
			
		||||
    name: pkgmgr-install
 | 
			
		||||
  vars:
 | 
			
		||||
    package_name: btrfs-auto-balancer
 | 
			
		||||
  when: run_once_system_btrfs_auto_balancer is not defined
 | 
			
		||||
 | 
			
		||||
- name: configure system-btrfs-auto-balancer.cymais.service
 | 
			
		||||
 
 | 
			
		||||
@@ -1,25 +0,0 @@
 | 
			
		||||
---
 | 
			
		||||
galaxy_info:
 | 
			
		||||
  author: "Kevin Veen-Birkenbach"
 | 
			
		||||
  description: "Automates the creation of a swapfile on the target system by cloning and executing a swapfile creation script, ensuring adequate swap space for improved system performance."
 | 
			
		||||
  license: "CyMaIS NonCommercial License (CNCL)"
 | 
			
		||||
  license_url: "https://s.veen.world/cncl"
 | 
			
		||||
  company: |
 | 
			
		||||
    Kevin Veen-Birkenbach
 | 
			
		||||
    Consulting & Coaching Solutions
 | 
			
		||||
    https://www.veen.world
 | 
			
		||||
  min_ansible_version: "2.9"
 | 
			
		||||
  platforms:
 | 
			
		||||
    - name: Linux
 | 
			
		||||
      versions:
 | 
			
		||||
        - all
 | 
			
		||||
  galaxy_tags:
 | 
			
		||||
    - swapfile
 | 
			
		||||
    - system
 | 
			
		||||
    - performance
 | 
			
		||||
    - automation
 | 
			
		||||
  repository: "https://s.veen.world/cymais"
 | 
			
		||||
  issue_tracker_url: "https://s.veen.world/cymaisissues"
 | 
			
		||||
  documentation: "https://s.veen.world/cymais"
 | 
			
		||||
dependencies:
 | 
			
		||||
  - package-manager
 | 
			
		||||
@@ -1,7 +1,8 @@
 | 
			
		||||
- name: install swap-forge
 | 
			
		||||
  command:
 | 
			
		||||
    cmd: "pkgmgr install swap-forge --clone-mode https"
 | 
			
		||||
  become: true
 | 
			
		||||
- name: "{{ role_name }} | pkgmgr install"
 | 
			
		||||
  include_role:
 | 
			
		||||
    name: pkgmgr-install
 | 
			
		||||
  vars:
 | 
			
		||||
    package_name: swap-forge
 | 
			
		||||
 | 
			
		||||
- name: Execute create swapfile script
 | 
			
		||||
  ansible.builtin.shell: swap-forge "{{swapfile_size}}"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								roles/update-pkgmgr/TODO.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								roles/update-pkgmgr/TODO.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
# Todos
 | 
			
		||||
- Activate update again. Atm not possible, because it pulls all repos
 | 
			
		||||
@@ -15,7 +15,7 @@ galaxy_info:
 | 
			
		||||
        - all
 | 
			
		||||
  galaxy_tags:
 | 
			
		||||
    - update
 | 
			
		||||
    - package-manager
 | 
			
		||||
    - pkgmgr
 | 
			
		||||
    - pkgmgr
 | 
			
		||||
    - system
 | 
			
		||||
  repository: "https://s.veen.world/cymais"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,2 +1,2 @@
 | 
			
		||||
- name: "Update all repositories with pkgmgr"
 | 
			
		||||
  command: "pkgmgr update --all"
 | 
			
		||||
#- name: "Update all repositories with pkgmgr"
 | 
			
		||||
#  command: "pkgmgr update --all"
 | 
			
		||||
		Reference in New Issue
	
	Block a user