From 1079dc7bb8f3e830d7109b73f9c3294910777b91 Mon Sep 17 00:00:00 2001 From: shockrah Date: Mon, 29 Jul 2024 01:34:00 -0700 Subject: [PATCH] setting up docker-compose and other things now --- .../playbooks/setup-docker-compose.yaml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 infra/static-vultr/ansible/playbooks/setup-docker-compose.yaml diff --git a/infra/static-vultr/ansible/playbooks/setup-docker-compose.yaml b/infra/static-vultr/ansible/playbooks/setup-docker-compose.yaml new file mode 100644 index 0000000..f486e84 --- /dev/null +++ b/infra/static-vultr/ansible/playbooks/setup-docker-compose.yaml @@ -0,0 +1,47 @@ +--- +- hosts: webhost + remote_user: webadmin + become: true + tasks: + - name: Install docker and docker-compose + apt: + update_cache: true + pkg: + - ca-certificates + - curl + - name: Setup keyring + command: + cmd: "install -m 0755 -d /etc/apt/keyrings" + - name: Download docker gpg key + get_url: + url: https://download.docker.com/linux/ubuntu/gpg + dest: /etc/apt/keyrings/docker.asc + - name: Set perms on /etc/apt/keyrings/docker.asc + file: + dest: /etc/apt/keyrings/docker.asc + mode: a+r + - name: Ensure docker.lst exists + copy: + content: '' + dest: /etc/apt/sources.list.d/docker.list + force: false + group: root + owner: root + mode: 0644 + - name: Ensure docker.lst is present for apt + lineinfile: + line: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu jammy stable\n" + dest: /etc/apt/sources.list.d/docker.list + state: present + - name: install docker packages + apt: + update_cache: true + pkg: + - docker-ce + - docker-ce-cli + - containerd.io + - docker-buildx-plugin + - docker-compose-plugin + + +