From b128207405f00d8c0e09c96b0b01e871d6850ef8 Mon Sep 17 00:00:00 2001 From: L3D Date: Sat, 15 Apr 2023 23:18:17 +0200 Subject: [PATCH] Update Ansible Collections on website --- Makefile | 33 ++++++++++++++++++++------------- content/contents.lr | 19 +++++++++++++++---- flowblocks/collections.ini | 5 +++++ flowblocks/single.ini | 23 +++++++++++++++++++++++ templates/frontpage.html | 20 ++++++++++++++++++-- 5 files changed, 81 insertions(+), 19 deletions(-) create mode 100644 flowblocks/single.ini diff --git a/Makefile b/Makefile index e6e9d46..4c4b37e 100644 --- a/Makefile +++ b/Makefile @@ -9,18 +9,18 @@ all: build install: if hash apt-get 2>/dev/null; then \ - apt-get update -qq >/dev/null && apt-get install -qq apt-utils imagemagick python3-pip python3-setuptools gcc git-lfs python3-venv; \ + apt-get update -qq >/dev/null && apt-get install -qq apt-utils imagemagick python3-pip python3-setuptools gcc git-lfs python3-venv rsync; \ elif hash pacman 2>/dev/null; then \ - pacman -Syu imagemagick python-pip glibc lib32-glibc gcc git-lfs python3-venv --noconfirm; \ + pacman -Syu imagemagick python-pip glibc lib32-glibc gcc git-lfs python3-venv rsync --noconfirm; \ elif hash dnf 2>/dev/null; then \ - dnf install -y ImageMagick python3-pip gcc git-lfs; \ + dnf install -y ImageMagick python3-pip gcc git-lfs rsync; \ else \ - echo -e "Please install Imagemagick, python3-pip git-lfs, python3-venv and gcc"; \ + echo -e "Please install Imagemagick, python3-pip git-lfs, python3-venv, rsync and gcc"; \ fi venv: if [ -z "${VIRTUAL_ENV}" ]; then \ - printf "Run 'python3 -m venv lektor' to create venv.\nRun 'source lektor/bin/activate' to activate venv.\n"; \ + printf "Run 'python3 -m venv lektor' to create venv.\nRun 'source lektor/bin/activate' to activate venv.\n"; \ printf "Run 'pip3 install wheel --upgrade' next.\nRun 'pip3 install lektor --upgrade' to install lektor"; \ fi @@ -37,7 +37,7 @@ build: server: if [ -z "${VIRTUAL_ENV}" ]; then \ - printf "Run 'source lektor/bin/activate' to enable venv. Or 'make install' to create venv"; \ + printf "Run 'source lektor/bin/activate' to enable venv. Or 'make install' to create venv"; \ else \ if python3 -m lektor --version 2>/dev/null; then \ python3 -m lektor server $(LEKTOR_SERVER_FLAGS) $(LEKTOR_PLUGIN_FLAGS); \ @@ -48,10 +48,11 @@ server: dev: if [ -z "${VIRTUAL_ENV}" ]; then \ - printf "Run 'source lektor/bin/activate' to enable venv. Or 'make install' and 'make venv' to create venv"; \ + printf "Run 'source lektor/bin/activate' to enable venv. Or 'make install' to create venv"; \ else \ lektor plugin flush-cache; \ - lektor clean --yes ; \ + lektor clean --yes; \ + rm assets/svg/*; \ if python3 -m lektor --version 2>/dev/null; then \ python3 -m lektor server $(LEKTOR_SERVER_FLAGS) $(LEKTOR_PLUGIN_FLAGS); \ else \ @@ -61,10 +62,16 @@ dev: deploy: if [ -z "${VIRTUAL_ENV}" ]; then \ - printf "Run 'source lektor/bin/activate' to enable venv. Or 'make install' and 'make venv' to create venv"; \ - else - lektor clean --yes; \ + printf "Run 'source lektor/bin/activate' to enable venv. Or 'make install' to create venv"; \ + else \ lektor plugin flush-cache; \ - lektor build $(LEKTOR_PLUGIN_FLAGS) $(LEKTOR_DEPLOY_FLAGS); \ - lektor deploy $(LEKTOR_PLUGIN_FLAGS) $(LEKTOR_DEPLOY_FLAGS); \ + lektor clean --yes; \ + rm assets/svg/*; \ + if python3 -m lektor --version 2>/dev/null; then \ + python3 -m lektor build $(LEKTOR_PLUGIN_FLAGS) $(LEKTOR_DEPLOY_FLAGS); \ + python3 -m lektor deploy $(LEKTOR_PLUGIN_FLAGS) $(LEKTOR_DEPLOY_FLAGS); \ + else \ + lektor build $(LEKTOR_PLUGIN_FLAGS) $(LEKTOR_DEPLOY_FLAGS); \ + lektor deploy $(LEKTOR_PLUGIN_FLAGS) $(LEKTOR_DEPLOY_FLAGS); \ + fi; \ fi diff --git a/content/contents.lr b/content/contents.lr index 0d5c088..5ebbde7 100644 --- a/content/contents.lr +++ b/content/contents.lr @@ -326,16 +326,27 @@ collections: #### collections #### name: Ansible Git Server Collection ---- -gitrepo: +gitrepo: https://github.com/roles-ansible/ansible_collection_git.git ---- -gitearepo: +gitearepo: https://backwesen.de/ansible/ansible_collection_git.git ---- no_galaxy: true ---- galaxy_name: l3d.git ---- -galaxy_url: +galaxy_url: https://galaxy.ansible.com/l3d/git ---- -maintainance: false +maintainance: well ---- license: MIT +---- +roles: + +##### single ##### +name: Gitea and Forgejo +----- +no_galaxy: true +----- +role_name: l3d.gitea +----- +galaxy_name: l3d.git.gitea diff --git a/flowblocks/collections.ini b/flowblocks/collections.ini index 565a214..cf329c7 100644 --- a/flowblocks/collections.ini +++ b/flowblocks/collections.ini @@ -48,3 +48,8 @@ type = select choices = MIT,GPLv3,BSD 3-Clause,CC-BY-4.0,CC-BY-SA-4.0,Apache-2,proprietary default = MIT width = 1/2 + +[fields.roles] +label = Ansible Roles as part of the role +type = flow +flow_blocks = single diff --git a/flowblocks/single.ini b/flowblocks/single.ini new file mode 100644 index 0000000..450f1a6 --- /dev/null +++ b/flowblocks/single.ini @@ -0,0 +1,23 @@ +[block] +name = Add Ansible Role as part of this Collection +button_label = Add Ansible Repo + +[fields.name] +label = Ansible Role Name +description = Full Name +type = string +width = 1/3 + +[fields.role_name] +label = Role Name (ID) +description = Id of Role on this page +type = string +width = 1/3 +default = l3d.template + +[fields.galaxy_name] +label = Ansible Collection Galaxy Name +description = And Collection Icons file Name +type = string +width = 1/3 +default = l3d.collection.template diff --git a/templates/frontpage.html b/templates/frontpage.html index 7f40850..e59412d 100644 --- a/templates/frontpage.html +++ b/templates/frontpage.html @@ -5,6 +5,11 @@ {% if this.collections is defined %} {% if this.collections.blocks | length != 0 %} Ansible Collections + {% if this.roles is defined %} + {% if this.roles.blocks | length != 0 %} + | + {% endif %} + {% endif %} {% endif %} {% endif %} {% if this.roles is defined %} @@ -14,7 +19,7 @@ {% endif %} {% if this.collections is defined %} {% if this.collections.blocks | length != 0 %} -

{{ this.tablecollectionstitle }}

+

{{ this.tablecollectionstitle }}

@@ -53,12 +58,23 @@ +
+ {% for rle in blk.roles.blocks -%} + + {% endfor %} +
  • {% if blk.no_galaxy %} - + {% else %}-{% endif %}