From 29faea7843ffa00ebd1b9618ac57e3f949775caf Mon Sep 17 00:00:00 2001 From: clyhtsuriva Date: Fri, 7 Mar 2025 21:02:34 +0100 Subject: ansible: Add tasks to clone docker subfolder in docker role --- ansible/roles/docker/tasks/main.yml | 45 ++++--------------------------------- 1 file changed, 4 insertions(+), 41 deletions(-) (limited to 'ansible/roles/docker/tasks/main.yml') diff --git a/ansible/roles/docker/tasks/main.yml b/ansible/roles/docker/tasks/main.yml index 37d9b4d..6f14f98 100644 --- a/ansible/roles/docker/tasks/main.yml +++ b/ansible/roles/docker/tasks/main.yml @@ -1,44 +1,7 @@ --- -- name: Set Docker repository variables based on OS - ansible.builtin.set_fact: - docker_repo: "{{ docker_repos[ansible_distribution] }}" - docker_gpg_key_url: "{{ docker_gpg_keys[ansible_distribution] }}" +- name: Install Docker + ansible.builtin.include_tasks: install_docker.yml -- name: Install required dependencies - ansible.builtin.apt: - name: "{{ docker_dependencies }}" - state: present - update_cache: true - -- name: Ensure /etc/apt/keyrings directory exists - ansible.builtin.file: - path: /etc/apt/keyrings - state: directory - mode: '0755' - -- name: Download and add Docker GPG key - ansible.builtin.get_url: - url: "{{ docker_gpg_key_url }}" - dest: /etc/apt/keyrings/docker.asc - mode: '0644' - -- name: Add Docker repository - ansible.builtin.apt_repository: - repo: >- - deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] - {{ docker_repo }} {{ ansible_distribution_release }} stable - state: present - filename: docker - -- name: Install Docker packages - ansible.builtin.apt: - name: "{{ docker_packages }}" - state: present - update_cache: true - -- name: Ensure Docker service is started and enabled - ansible.builtin.systemd: - name: docker - state: started - enabled: true +- name: Clone the Docker subfolder + ansible.builtin.include_tasks: clone_docker_subfolder.yml ... -- cgit v1.2.3