jd-apprentice / jd-server

🖥️ Homelab
3 stars 0 forks source link

[MAINTENANCE] Update docker in all machines #61

Open jd-apprentice opened 3 months ago

jd-apprentice commented 3 months ago

After updating dozzle I've noticed that I have different versions of docker running on each of the machines

Image

jd-apprentice commented 2 months ago

Trying the following playbook

---
- name: install docker
  hosts: all
  become: yes
  vars_prompt:

    - name: "is_update"
      prompt: "Are you upgrading? (yes/no)"
      default: "no"
      private: no

  tasks:
    - name: Run apt-get update
      become: yes
      apt: update_cache=yes

    - name: Install curl
      become: yes
      apt: name=curl state=present

    - name: Run curl command
      become: yes
      shell: curl -fsSL test.docker.com -o get-docker.sh && sh get-docker.sh

    - name: Add user to docker group
      become: yes
      shell: usermod -aG docker $USER
      when: is_update == 'no'
jd-apprentice commented 2 months ago

Image

Fuck myself