From 08b05dbf5529f7d7972f8033923719a568f2c9f9 Mon Sep 17 00:00:00 2001 From: shockrah Date: Sun, 2 Jan 2022 16:04:10 -0800 Subject: [PATCH] + Docker based service hosts are now supported via the new ansible role Usage of this role is still sketchy however at least all the required playbooks are in place Main issue at the moment is the interfacing with these playbooks --- aws/playbooks/tasks/docker/debian.yml | 41 +++++++++++++++++++ aws/playbooks/tasks/docker/main.yml | 9 ++++ aws/playbooks/tasks/main.yml | 2 - .../update-app.yml} | 0 aws/playbooks/tasks/update-docker.yml | 3 -- 5 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 aws/playbooks/tasks/docker/debian.yml create mode 100644 aws/playbooks/tasks/docker/main.yml delete mode 100644 aws/playbooks/tasks/main.yml rename aws/playbooks/tasks/{update-service.yml => systemd/update-app.yml} (100%) delete mode 100644 aws/playbooks/tasks/update-docker.yml diff --git a/aws/playbooks/tasks/docker/debian.yml b/aws/playbooks/tasks/docker/debian.yml new file mode 100644 index 0000000..7420ea4 --- /dev/null +++ b/aws/playbooks/tasks/docker/debian.yml @@ -0,0 +1,41 @@ +--- +tasks: + - name: Install docker dependencies + become: yes + become_method: sudo + apt: + name: "{{item}}" + update_cache: yes + loop: + - apt-transport-https + - ca-certificates + - curl + - gnupg + - software-properties-common + - lsb-release + + - name: Install docker GPG key + become: yes + become_method: sudo + apt_key: + url: https://download.docker.com/linux/ubuntu/gpg + state: present + + - name: Add Docker Apt Repo + become: yes + become_method: sudo + apt_repository: + repo: deb https://download.docker.com/linux/ubuntu impish stable + state: present + + - name: Install Docker components + become: yes + become_method: sudo + apt: + name: "{{item}}" + update_cache: yes + loop: + - docker-ce + - docker-ce-cli + - containerd.io + diff --git a/aws/playbooks/tasks/docker/main.yml b/aws/playbooks/tasks/docker/main.yml new file mode 100644 index 0000000..7789beb --- /dev/null +++ b/aws/playbooks/tasks/docker/main.yml @@ -0,0 +1,9 @@ +# This playbook is setup to install docker on debian based systems +--- +- hosts: main + tasks: + - include_tasks: 'debian.yml' + when: + ansible_distribution: Debian + + diff --git a/aws/playbooks/tasks/main.yml b/aws/playbooks/tasks/main.yml deleted file mode 100644 index d3850be..0000000 --- a/aws/playbooks/tasks/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# tasks file for playbooks diff --git a/aws/playbooks/tasks/update-service.yml b/aws/playbooks/tasks/systemd/update-app.yml similarity index 100% rename from aws/playbooks/tasks/update-service.yml rename to aws/playbooks/tasks/systemd/update-app.yml diff --git a/aws/playbooks/tasks/update-docker.yml b/aws/playbooks/tasks/update-docker.yml deleted file mode 100644 index 0fd3011..0000000 --- a/aws/playbooks/tasks/update-docker.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -- hosts: {{ main_host }} - remote_user: {{ remote_user }}