Refactor deployment workflows and enhance Docker configuration management
Deploy cloud-pc / deploy (push) Failing after 1s
Deploy ru-vps / deploy (push) Failing after 1s
Deploy mini-pc / deploy (push) Failing after 2s

This commit is contained in:
Dmitry
2026-05-27 21:46:38 +03:00
parent 47acec436b
commit dc76e48e21
7 changed files with 146 additions and 124 deletions
+25
View File
@@ -18,6 +18,31 @@
loop: "{{ bootstrap_ssh_public_keys }}"
when: bootstrap_ssh_public_keys | length > 0
- name: Gather service facts
ansible.builtin.service_facts:
- name: Ensure Docker config directory exists
ansible.builtin.file:
path: /etc/docker
state: directory
mode: "0755"
- name: Configure Docker registry mirrors
ansible.builtin.copy:
dest: /etc/docker/daemon.json
content: "{{ {'registry-mirrors': docker_registry_mirrors} | to_nice_json }}\n"
mode: "0644"
register: docker_daemon_config
when: docker_registry_mirrors | length > 0
- name: Restart Docker after daemon config change
ansible.builtin.service:
name: docker
state: restarted
when:
- docker_daemon_config is changed
- "'docker.service' in ansible_facts.services"
# Команды, которые реально нужны без пароля:
# apt / apt-get — обновление пакетов
# systemctl — управление сервисами