mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2025-06-25 10:47:51 +02:00
Add migration task for Debiant apt repositories for Docker referencing /etc/apt/keyrings/docker.asc key
Related to: - https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3337 - https://github.com/geerlingguy/ansible-role-docker/pull/436
This commit is contained in:
@ -0,0 +1,19 @@
|
||||
---
|
||||
|
||||
- name: Check if the Docker apt repository file exists
|
||||
stat:
|
||||
path: "{{ matrix_playbook_migration_docker_trusted_gpg_d_migration_repository_path }}"
|
||||
register: matrix_playbook_migration_docker_trusted_gpg_d_migration_repository_path_status
|
||||
|
||||
- when: matrix_playbook_migration_docker_trusted_gpg_d_migration_repository_path_status.stat.exists | bool
|
||||
block:
|
||||
- name: Read repository file
|
||||
slurp:
|
||||
path: "{{ matrix_playbook_migration_docker_trusted_gpg_d_migration_repository_path }}"
|
||||
register: matrix_playbook_migration_docker_trusted_gpg_d_migration_repository_path_content
|
||||
|
||||
- name: Remove Docker apt repository file if old key path found
|
||||
when: "'/etc/apt/trusted.gpg.d/docker.asc' in matrix_playbook_migration_docker_trusted_gpg_d_migration_repository_path_content.content | b64decode"
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_playbook_migration_docker_trusted_gpg_d_migration_repository_path }}"
|
||||
state: absent
|
@ -15,6 +15,15 @@
|
||||
block:
|
||||
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/debian_docker_signedby_migration.yml"
|
||||
|
||||
- when: ansible_os_family == 'Debian' and matrix_playbook_docker_installation_enabled | bool and matrix_playbook_migration_docker_trusted_gpg_d_migration_enabled | bool
|
||||
tags:
|
||||
- setup-all
|
||||
- install-all
|
||||
- setup-docker
|
||||
- install-docker
|
||||
block:
|
||||
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/debian_docker_trusted_gpg_d_migration_migration.yml"
|
||||
|
||||
- tags:
|
||||
- setup-all
|
||||
- install-all
|
||||
|
Reference in New Issue
Block a user