Update Ansible Collections on website
This commit is contained in:
parent
a4a7eb1a67
commit
b128207405
5 changed files with 81 additions and 19 deletions
33
Makefile
33
Makefile
|
@ -9,18 +9,18 @@ all: build
|
||||||
|
|
||||||
install:
|
install:
|
||||||
if hash apt-get 2>/dev/null; then \
|
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 \
|
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 \
|
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 \
|
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
|
fi
|
||||||
|
|
||||||
venv:
|
venv:
|
||||||
if [ -z "${VIRTUAL_ENV}" ]; then \
|
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"; \
|
printf "Run 'pip3 install wheel --upgrade' next.\nRun 'pip3 install lektor --upgrade' to install lektor"; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ build:
|
||||||
|
|
||||||
server:
|
server:
|
||||||
if [ -z "${VIRTUAL_ENV}" ]; then \
|
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 \
|
else \
|
||||||
if python3 -m lektor --version 2>/dev/null; then \
|
if python3 -m lektor --version 2>/dev/null; then \
|
||||||
python3 -m lektor server $(LEKTOR_SERVER_FLAGS) $(LEKTOR_PLUGIN_FLAGS); \
|
python3 -m lektor server $(LEKTOR_SERVER_FLAGS) $(LEKTOR_PLUGIN_FLAGS); \
|
||||||
|
@ -48,10 +48,11 @@ server:
|
||||||
|
|
||||||
dev:
|
dev:
|
||||||
if [ -z "${VIRTUAL_ENV}" ]; then \
|
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 \
|
else \
|
||||||
lektor plugin flush-cache; \
|
lektor plugin flush-cache; \
|
||||||
lektor clean --yes ; \
|
lektor clean --yes; \
|
||||||
|
rm assets/svg/*; \
|
||||||
if python3 -m lektor --version 2>/dev/null; then \
|
if python3 -m lektor --version 2>/dev/null; then \
|
||||||
python3 -m lektor server $(LEKTOR_SERVER_FLAGS) $(LEKTOR_PLUGIN_FLAGS); \
|
python3 -m lektor server $(LEKTOR_SERVER_FLAGS) $(LEKTOR_PLUGIN_FLAGS); \
|
||||||
else \
|
else \
|
||||||
|
@ -61,10 +62,16 @@ dev:
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
if [ -z "${VIRTUAL_ENV}" ]; then \
|
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
|
else \
|
||||||
lektor clean --yes; \
|
|
||||||
lektor plugin flush-cache; \
|
lektor plugin flush-cache; \
|
||||||
lektor build $(LEKTOR_PLUGIN_FLAGS) $(LEKTOR_DEPLOY_FLAGS); \
|
lektor clean --yes; \
|
||||||
lektor deploy $(LEKTOR_PLUGIN_FLAGS) $(LEKTOR_DEPLOY_FLAGS); \
|
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
|
fi
|
||||||
|
|
|
@ -326,16 +326,27 @@ collections:
|
||||||
#### collections ####
|
#### collections ####
|
||||||
name: Ansible Git Server Collection
|
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
|
no_galaxy: true
|
||||||
----
|
----
|
||||||
galaxy_name: l3d.git
|
galaxy_name: l3d.git
|
||||||
----
|
----
|
||||||
galaxy_url:
|
galaxy_url: https://galaxy.ansible.com/l3d/git
|
||||||
----
|
----
|
||||||
maintainance: false
|
maintainance: well
|
||||||
----
|
----
|
||||||
license: MIT
|
license: MIT
|
||||||
|
----
|
||||||
|
roles:
|
||||||
|
|
||||||
|
##### single #####
|
||||||
|
name: Gitea and Forgejo
|
||||||
|
-----
|
||||||
|
no_galaxy: true
|
||||||
|
-----
|
||||||
|
role_name: l3d.gitea
|
||||||
|
-----
|
||||||
|
galaxy_name: l3d.git.gitea
|
||||||
|
|
|
@ -48,3 +48,8 @@ type = select
|
||||||
choices = MIT,GPLv3,BSD 3-Clause,CC-BY-4.0,CC-BY-SA-4.0,Apache-2,proprietary
|
choices = MIT,GPLv3,BSD 3-Clause,CC-BY-4.0,CC-BY-SA-4.0,Apache-2,proprietary
|
||||||
default = MIT
|
default = MIT
|
||||||
width = 1/2
|
width = 1/2
|
||||||
|
|
||||||
|
[fields.roles]
|
||||||
|
label = Ansible Roles as part of the role
|
||||||
|
type = flow
|
||||||
|
flow_blocks = single
|
||||||
|
|
23
flowblocks/single.ini
Normal file
23
flowblocks/single.ini
Normal file
|
@ -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
|
|
@ -5,6 +5,11 @@
|
||||||
{% if this.collections is defined %}
|
{% if this.collections is defined %}
|
||||||
{% if this.collections.blocks | length != 0 %}
|
{% if this.collections.blocks | length != 0 %}
|
||||||
<a href="#collections">Ansible Collections</a>
|
<a href="#collections">Ansible Collections</a>
|
||||||
|
{% if this.roles is defined %}
|
||||||
|
{% if this.roles.blocks | length != 0 %}
|
||||||
|
|
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if this.roles is defined %}
|
{% if this.roles is defined %}
|
||||||
|
@ -14,7 +19,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if this.collections is defined %}
|
{% if this.collections is defined %}
|
||||||
{% if this.collections.blocks | length != 0 %}
|
{% if this.collections.blocks | length != 0 %}
|
||||||
<h2 id="roles">{{ this.tablecollectionstitle }}</h2>
|
<h2 id="collections">{{ this.tablecollectionstitle }}</h2>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -53,12 +58,23 @@
|
||||||
</ul>
|
</ul>
|
||||||
</code>
|
</code>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
{% for rle in blk.roles.blocks -%}
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="#{{ rle.role_name }}" alt="{{ rle.name }}">
|
||||||
|
<img src="{{ {'name': rle.galaxy_name, 'state': rle.galaxy_name, 'label': 'ansible-role', suffix: 'collection_role'} | svg }}" />
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
{% if blk.no_galaxy %}
|
{% if blk.no_galaxy %}
|
||||||
<a href="{{ blk.galaxy_url }}">
|
<a href="{{ blk.galaxy_url }}">
|
||||||
<img src="{{ {'name': blk.galaxy_name, 'state': blk.galaxy_name, 'label': 'ansible-galaxy', 'color': '#5eba5e', 'suffix': 'collection'} | svg }}" />
|
<img src="{{ {'name': blk.galaxy_name, 'state': blk.galaxy_name, 'label': 'ansible-collection', 'color': '#5eba5e', 'suffix': 'collection'} | svg }}" />
|
||||||
</a>
|
</a>
|
||||||
{% else %}-{% endif %}
|
{% else %}-{% endif %}
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in a new issue