From 4480dcfb5a49d1e1db7341a7c1d7498b0a8b6b63 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Sun, 13 Feb 2022 22:55:55 +0100 Subject: wings: add docker repo --- galaxy.yml | 2 +- roles/pterodactyl_wings/tasks/main.yml | 34 ++++++++++++++++++++---- roles/pterodactyl_wings/templates/docker.list.j2 | 4 +++ 3 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 roles/pterodactyl_wings/templates/docker.list.j2 diff --git a/galaxy.yml b/galaxy.yml index f587b0d..900bad4 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,6 +1,6 @@ namespace: kompetenzbolzen name: stuff -version: 0.9.4 +version: 0.9.5 readme: README.md authors: - Jonas Gunz diff --git a/roles/pterodactyl_wings/tasks/main.yml b/roles/pterodactyl_wings/tasks/main.yml index 4e7d654..8641971 100644 --- a/roles/pterodactyl_wings/tasks/main.yml +++ b/roles/pterodactyl_wings/tasks/main.yml @@ -1,4 +1,33 @@ --- +- name: Install GnuPG + apt: + name: gnupg2 + become: yes + +- name: Docker APT Key + apt_key: + url: 'https://download.docker.com/linux/debian/gpg' + state: present + become: yes + +- name: Install Docker APT Repository + template: + src: docker.list.j2 + dest: /etc/apt/sources.list.d/docker.list + become: yes + register: install_repo + +- name: Update cache + apt: + update_cache: yes + become: yes + when: install_repo.changed + +- name: Install packages + apt: + name: docker-ce docker-ce-cli containerd.io + become: yes + - name: Create dirs file: state: directory @@ -11,11 +40,6 @@ notify: - Handle systemd -- name: Install packages - apt: - name: docker.io - become: yes - - name: Enable docker systemd: name: docker diff --git a/roles/pterodactyl_wings/templates/docker.list.j2 b/roles/pterodactyl_wings/templates/docker.list.j2 new file mode 100644 index 0000000..a7ac6f4 --- /dev/null +++ b/roles/pterodactyl_wings/templates/docker.list.j2 @@ -0,0 +1,4 @@ +# vi: ft=debsources +# This file is managed by Ansible. Do NOT change. + +deb https://download.docker.com/linux/debian {{ ansible_facts.distribution_release }} stable -- cgit v1.2.3