diff options
author | pmikus <peter.mikus@protonmail.ch> | 2024-07-22 13:51:10 +0200 |
---|---|---|
committer | Peter Mikus <peter.mikus@protonmail.ch> | 2024-07-26 07:21:19 +0000 |
commit | beacfb25fc1ef4a78415d93f97afeffb121a8ea2 (patch) | |
tree | 0f538d87b787ab5efe43f3e3950ca5553f58cd18 /fdio.infra.ansible/roles/docker | |
parent | f97e5e9b91bc01c8fb5771b47107b0d8ef1aacab (diff) |
feat(infra): Ubuntu 24.04 LTSoper-240722
Signed-off-by: Peter Mikus <peter.mikus@protonmail.ch>
Change-Id: I81e48360fcc970a16f1203955003d59f476b3233
(cherry picked from commit 586b271c3f3401c8901ee26a27e804483d71d6c7)
Diffstat (limited to 'fdio.infra.ansible/roles/docker')
-rw-r--r-- | fdio.infra.ansible/roles/docker/defaults/main.yaml | 2 | ||||
-rw-r--r-- | fdio.infra.ansible/roles/docker/handlers/main.yaml | 2 | ||||
-rw-r--r-- | fdio.infra.ansible/roles/docker/meta/main.yaml | 21 | ||||
-rw-r--r-- | fdio.infra.ansible/roles/docker/tasks/Debian.yaml (renamed from fdio.infra.ansible/roles/docker/tasks/jammy.yaml) | 8 | ||||
-rw-r--r-- | fdio.infra.ansible/roles/docker/tasks/main.yaml | 24 |
5 files changed, 33 insertions, 24 deletions
diff --git a/fdio.infra.ansible/roles/docker/defaults/main.yaml b/fdio.infra.ansible/roles/docker/defaults/main.yaml index bf97b4a192..e0338fb5ad 100644 --- a/fdio.infra.ansible/roles/docker/defaults/main.yaml +++ b/fdio.infra.ansible/roles/docker/defaults/main.yaml @@ -1,5 +1,5 @@ --- -# file: roles/docker/defaults/main.yaml +# file: defaults/main.yaml # Version options. docker_edition: "ce" diff --git a/fdio.infra.ansible/roles/docker/handlers/main.yaml b/fdio.infra.ansible/roles/docker/handlers/main.yaml index 53eb8528f6..c8c3328cac 100644 --- a/fdio.infra.ansible/roles/docker/handlers/main.yaml +++ b/fdio.infra.ansible/roles/docker/handlers/main.yaml @@ -1,5 +1,5 @@ --- -# file roles/docker/handlers/main.yaml +# file handlers/main.yaml - name: Restart Docker ansible.builtin.service: diff --git a/fdio.infra.ansible/roles/docker/meta/main.yaml b/fdio.infra.ansible/roles/docker/meta/main.yaml index 7bef656eb5..0a1fe9787b 100644 --- a/fdio.infra.ansible/roles/docker/meta/main.yaml +++ b/fdio.infra.ansible/roles/docker/meta/main.yaml @@ -4,15 +4,18 @@ dependencies: [] galaxy_info: - role_name: docker - author: fd.io - description: Docker-CE for Linux. - company: none - license: "license (Apache)" - min_ansible_version: 2.9 + role_name: "docker" + author: "pmikus" + description: "Docker-CE for Linux." + company: "none" + license: "license (BSD, MIT)" + min_ansible_version: "2.9" platforms: - - name: Ubuntu + - name: "Ubuntu" versions: - - jammy + - "jammy" + - name: "Debian" + versions: + - "bookworm" galaxy_tags: - - docker + - "docker" diff --git a/fdio.infra.ansible/roles/docker/tasks/jammy.yaml b/fdio.infra.ansible/roles/docker/tasks/Debian.yaml index 8ec7a01ee1..f81277ac47 100644 --- a/fdio.infra.ansible/roles/docker/tasks/jammy.yaml +++ b/fdio.infra.ansible/roles/docker/tasks/Debian.yaml @@ -1,7 +1,7 @@ --- -# file: roles/docker/tasks/ubuntu_jammy.yaml +# file: tasks/Debian.yaml -- name: Inst - Dependencies +- name: "Install Dependencies" ansible.builtin.apt: name: - "apt-transport-https" @@ -14,14 +14,14 @@ tags: - docker-inst-dependencies -- name: Conf - Add APT Key +- name: "Add APT Key" ansible.builtin.apt_key: url: "{{ docker_apt_gpg_key }}" state: "{{ docker_apt_gpg_key_state }}" tags: - docker-conf-apt -- name: Conf - Install APT Repository +- name: "Install APT Repository" ansible.builtin.apt_repository: repo: "{{ docker_apt_repository }}" state: "{{ docker_apt_repository_state }}" diff --git a/fdio.infra.ansible/roles/docker/tasks/main.yaml b/fdio.infra.ansible/roles/docker/tasks/main.yaml index e07b29e363..4146dbbadf 100644 --- a/fdio.infra.ansible/roles/docker/tasks/main.yaml +++ b/fdio.infra.ansible/roles/docker/tasks/main.yaml @@ -1,11 +1,17 @@ --- -# file: roles/docker/tasks/main.yaml +# file: tasks/main.yaml -- include_tasks: "{{ ansible_distribution_release }}.yaml" +- name: "Install Prerequisites Based on OS" + ansible.builtin.include_tasks: + file: "{{ item }}" + with_first_found: + - files: + - "{{ ansible_os_family }}.yaml" + - "default.yaml" tags: - docker-inst-dependencies -- name: Inst - Docker +- name: "Install Docker" ansible.builtin.package: name: - "{{ docker_package }}" @@ -14,7 +20,7 @@ tags: - docker-inst-package -- name: Conf - Docker Service +- name: "Enable Docker Service" ansible.builtin.service: name: docker state: "{{ docker_service_state }}" @@ -24,7 +30,7 @@ tags: - docker-conf-service -- name: Conf - Docker Service Directory +- name: "Docker Service Directory" ansible.builtin.file: path: "/etc/systemd/system/docker.service.d" state: "directory" @@ -34,7 +40,7 @@ tags: - docker-conf-service -- name: Conf - Docker Daemon +- name: "Configure Docker Daemon" ansible.builtin.template: src: "templates/daemon.json.j2" dest: "/etc/docker/daemon.json" @@ -49,7 +55,7 @@ tags: - docker-conf-daemon -- name: Conf - Docker HTTP Proxy +- name: "Configure Docker HTTP Proxy" ansible.builtin.template: src: "templates/docker.service.proxy.http" dest: "/etc/systemd/system/docker.service.d/http-proxy.conf" @@ -65,7 +71,7 @@ tags: - docker-conf-service -- name: Conf - Docker HTTPS Proxy +- name: "Configure Docker HTTPS Proxy" ansible.builtin.template: src: "templates/docker.service.proxy.https" dest: "/etc/systemd/system/docker.service.d/https-proxy.conf" @@ -81,5 +87,5 @@ tags: - docker-conf-service -- name: Meta - Flush handlers +- name: "Meta - Flush handlers" ansible.builtin.meta: flush_handlers |