Compare commits

...

2 Commits

Author SHA1 Message Date
hogweed1
05b7decce3 docker-ansi
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2s
2026-05-16 00:41:05 +10:00
hogweed1
16c99a47eb upd ansible-print re 2026-05-16 00:03:10 +10:00
4 changed files with 65 additions and 11 deletions

View File

@@ -12,9 +12,10 @@ forks = 20
interpreter_python = auto_silent
ansible_python_interpreter = auto_silent
# Use the YAML callback plugin.
#stdout_callback = default
stdout_callback = moreati.rich.rich
##callback_result_format = yaml
stdout_callback = default
#### EXPL 2026-05-16 не взлетело из-за непонятного:: Exception, this is probably a bug: No module named 'ansible_collections.community.general.plugins.callback.ya
###stdout_callback = moreati.rich.rich
callback_result_format = yaml
# Use the stdout_callback when running ad-hoc commands.
bin_ansible_callbacks = True

View File

@@ -38,16 +38,21 @@ vms:
children:
printer:
kubernetes:
docker:
docker_vms:
docker:
hosts:
# swarm-node1.guaranteedstruggle.host:
# swarm-node2.guaranteedstruggle.host:
# swarm-node3.guaranteedstruggle.host:
children:
docker_vms:
hosts:
# swarm-node1.guaranteedstruggle.host:
# swarm-node2.guaranteedstruggle.host:
# swarm-node3.guaranteedstruggle.host:
harbor.guaranteedstruggle.host:
docker_lxc:
hosts:
nexus.guaranteedstruggle.host:
harbor.guaranteedstruggle.host:
kubernetes:
hosts:
@@ -69,7 +74,7 @@ printer:
#### TODO
lxc:
hosts:
hosts:
@@ -99,4 +104,6 @@ lxc:
# # price-loader.just-for-me.internal:
#gpu-slut.guaranteedstruggle.host:
root-ca.guaranteedstruggle.host:
root-ca.guaranteedstruggle.host:
children:
docker_lxc:

View File

@@ -20,6 +20,7 @@
- jq
- rsync
- unzip
- ca-certificates
#state: latest
state: present

View File

@@ -0,0 +1,45 @@
---
- name: Migrate Docker repository to modern DEB822 standard
hosts: docker
become: true
tasks:
# 1. Зачищаем старые следы (legacy-дефолт)
- name: Remove legacy Docker apt source list if exists
ansible.builtin.file:
path: /etc/apt/sources.list.d/docker.list
state: absent
- name: Remove legacy Docker GPG key from trusted.gpg.d
ansible.builtin.file:
path: /etc/apt/trusted.gpg.d/docker.gpg
state: absent
# 2. Разворачиваем репозиторий по "актуальной мете"
- name: Setup Docker CE repository using deb822 format
ansible.builtin.deb822_repository:
name: docker
types: deb
uris: https://download.docker.com/linux/debian
# ansible_distribution_release автоматически подставит имя дистрибутива (например, bookworm или trixie)
suites: "{{ ansible_distribution_release }}"
components: stable
# Ansible сам скачает текстовый ключ, дебронирует его в бинарный
# и сохранит по канону в /etc/apt/keyrings/docker.gpg
signed_by: https://download.docker.com/linux/debian/gpg
register: docker_repo_added
# 3. Обновляем кэш пакетов только при изменениях
- name: Run apt update
ansible.builtin.apt:
update_cache: true
when: docker_repo_added.changed
- name: Install the packages versions
ansible.builtin.package:
name:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-buildx-plugin
- docker-compose-plugin