cosmostat python comment enrichment

This commit is contained in:
2026-03-29 10:38:07 -07:00
parent 9646ee92fd
commit 6453a839a9
14 changed files with 95 additions and 791 deletions

View File

@ -107,29 +107,4 @@
virtualenv_command: python3 -m venv
state: present
# create node.js docker container for web dashboard
- name: node.js server container handler
when: false
block:
- name: Cosmostat - Init - node.js - copy server files
copy:
src: "web/node_server"
dest: "{{ service_control_web_folder }}/"
mode: 0755
owner: "{{ service_user }}"
group: "{{ service_user }}"
- name: Cosmostat - Init - node.js - build docker container
community.docker.docker_image:
name: ws_node
tag: latest
source: local
build:
path: "{{ service_control_web_folder }}/node_server"
dockerfile: Dockerfile
force_tag: true
state: present
force_source: true
...

View File

@ -1,7 +1,5 @@
---
# initializa environment
- name: Initialize Environment
when: not quick_refresh | bool
@ -16,7 +14,4 @@
when: not disable_local_api
include_tasks: web.yaml
#- name: Purge Old Containers
# when: not quick_refresh | bool
# include_tasks: purge.yaml
...

View File

@ -1,34 +0,0 @@
- name: Cosmostat - Clean up old ws_node image tags
block:
# Grab a list of all tags the image has
- name: Get all ws_node image tags
command: |
docker images --format "{{.Repository}}:{{.Tag}}" \
--filter=reference="ws_node:*"
register: all_tags_raw
changed_when: false
# Turn that raw string into a list of just the tag names
- name: Parse tag names out of the list
set_fact:
all_tags: >-
{{ all_tags_raw.stdout_lines |
map('regex_replace', '^ws_node:', '') |
list }}
# Keep everything *except* the one that ends with “:latest”
- name: Build list of tags that should be removed
set_fact:
tags_to_remove: "{{ all_tags | difference(['latest']) }}"
# Remove each old tag
- name: Delete old ws_node image tags
community.docker.docker_image:
name: ws_node
tag: "{{ item }}"
state: absent
loop: "{{ tags_to_remove }}"
when: tags_to_remove | length > 0
when: tags_to_remove | length > 0
tags:
- cleanup