From 89f1ff86ddf2995844c8d3a1a6f031b20e0ec61c Mon Sep 17 00:00:00 2001 From: richard Date: Tue, 15 Jul 2025 09:09:23 -0400 Subject: [PATCH] Cubox-m playbook - update_cubox-m.yaml - update homer homepage config --- ansible-5/cli/play/install-users | 3 + ansible-5/playbooks/update_cubox-m.yaml | 14 ++++ ansible-5/roles/homer/files/config.yml | 91 +++++++++++++++++++++++++ ansible-5/roles/homer/tasks/main.yaml | 17 +++++ 4 files changed, 125 insertions(+) create mode 100755 ansible-5/cli/play/install-users create mode 100644 ansible-5/playbooks/update_cubox-m.yaml create mode 100644 ansible-5/roles/homer/files/config.yml create mode 100644 ansible-5/roles/homer/tasks/main.yaml diff --git a/ansible-5/cli/play/install-users b/ansible-5/cli/play/install-users new file mode 100755 index 0000000..c83c1f6 --- /dev/null +++ b/ansible-5/cli/play/install-users @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +ansible-playbook playbooks/bootstrap.yaml -i inventory.ini --ask-pass --ask-become-pass --user=root diff --git a/ansible-5/playbooks/update_cubox-m.yaml b/ansible-5/playbooks/update_cubox-m.yaml new file mode 100644 index 0000000..a551ac3 --- /dev/null +++ b/ansible-5/playbooks/update_cubox-m.yaml @@ -0,0 +1,14 @@ +--- +# run updates on cubox-m + +- name: update cubox-m + hosts: cubox-m + gather_facts: true + + pre_tasks: + - name: ping + ansible.builtin.ping: + + roles: + - role: homer + become: true diff --git a/ansible-5/roles/homer/files/config.yml b/ansible-5/roles/homer/files/config.yml new file mode 100644 index 0000000..90ee2e6 --- /dev/null +++ b/ansible-5/roles/homer/files/config.yml @@ -0,0 +1,91 @@ +--- +# Homepage configuration +# https://github.com/bastienwirtz/homer/ +# See https://fontawesome.com/search for icons options +# + +title: cubox-m.xai-corp.net +subtitle: Start Page +header: true +icon: "fas fa-skull-crossbones" # Optional icon + +columns: "3" + +# Optional navbar +# links: [] # Allows for navbar (dark mode, layout, and search) without any links +links: + - name: "fontawesome" + icon: "fa-solid fa-server" + url: "https://fontawesome.com/search?q=files&o=r&ic=free&s=solid&ip=classic" + target: "_blank" # optional html a tag target attribute + +# Services +# First level array represent a group. +# Leave only a "items" key if not using group (group name, icon & tagstyle are optional, section separation will not be displayed). +services: + - name: "Hardware" + icon: "fa-solid fa-microchip" + items: + - name: "cubox-i" + icon: "fa-solid fa-server" + url: "https://cubox-i.xai-corp.net" + target: "_blank" # optional html a tag target attribute + - name: "cubox-m" + icon: "fa-solid fa-server" + url: "https://cubox-m.xai-corp.net" + target: "_blank" # optional html a tag target attribute + - name: "Brother Printer" + icon: "fa-solid fa-print" + subtitle: "printer management" + tag: "printer" + url: "https://laser.xai-corp.net/" + - name: "Bell Modem" + icon: "fa-solid fa-network-wired" + subtitle: "internet and tv" + tag: "network" + url: "http://192.168.2.1/" + - name: "Axe7800 Router" + icon: "fa-solid fa-network-wired" + subtitle: "wifi" + tag: "network" + url: "http://192.168.4.1/" + - name: "TP-Link Router" + icon: "fa-solid fa-network-wired" + subtitle: "dhcp" + tag: "network" + url: "http://192.168.4.3" + - name: "TP-Link 8-port switch" + icon: "fa-solid fa-network-wired" + subtitle: "switch" + tag: "network" + url: "http://192.168.4.101" + + - name: "Services" + icon: "fa-solid fa-cloud" + items: + - name: "gitea" + icon: "fa-solid fa-code-merge" + subtitle: "git" + tag: "git" + url: "https://git.xai-corp.net" + + - name: "xaibox" + icon: "fa-solid fa-folder-tree" + subtitle: "nextcloud" + tag: "files" + url: "https://xaibox.xai-corp.net" + + - name: "Saas" + icon: "fa-solid fa-cloud" + items: + - name: "tailscale" + icon: "fa-solid fa-network-wired" + subtitle: "proxy" + tag: "network" + url: "https://login.tailscale.com/admin/machines" + + - name: "ZoneEdit" + icon: "fa-solid fa-network-wired" + subtitle: "dns" + tag: "network" + url: "https://cp.zoneedit.com/manage/domains/" diff --git a/ansible-5/roles/homer/tasks/main.yaml b/ansible-5/roles/homer/tasks/main.yaml new file mode 100644 index 0000000..b8ba994 --- /dev/null +++ b/ansible-5/roles/homer/tasks/main.yaml @@ -0,0 +1,17 @@ +--- +# main task list for homer role + +#- name: pull config updates +# ansible.builtin.shell: +# cmd: git pull +# chdir: /srv/dev-disk-by-uuid-5bc063a8-cf51-435d-9105-5987792ecf48/docker-compose/homer/ + +#TODO: copy config file + +- name: Copy Homer config file + ansible.builtin.copy: + src: config.yml + dest: /srv/dev-disk-by-uuid-5bc063a8-cf51-435d-9105-5987792ecf48/docker-compose/homer/assets/config.yml + owner: root + group: root + mode: '0644'