Skip Navigation

Posts
7
Comments
15
Joined
3 yr. ago

  • v29 is a big update https://www.reddit.com/r/docker/comments/1ounfw8/docker_29_api_changes_breaking_changes/ ive made lxc config changes, and id like to have everything on the same update lvl. no have some apps with a lxc config because of official repos, and some other ansible powered with a lower version. i like to have everything on the same update level so i dont go crazy updating my homelab. besides, this would be "dodging" the problem. in my ansible training, id like to be able to add a repo to a given server.

  • yeah thats the thing - its apparently not doing ****. no keyring, no repo but it is connecting to the remote server. it does say on the log anytype.lab; which is my target server, and its selected from the correct inventory file:

    i know it must be something terribly stupid. but i just cant put my finger on it

  • could you maybe please send me the whole thing?

  • hum unfortunately either im doing something else wrong or its not working for me

     
        
    ---
    - name: Install Docker Engine and Docker Compose on Debian (Ansible WebUI compatible)
      hosts: all
      become: true
      become_user: root
    
      vars:
        docker_packages:
          - docker-ce
          - docker-ce-cli
          - containerd.io
          - docker-buildx-plugin
          - docker-compose-plugin
    
      tasks:
    
        - name: Ensure required packages are installed
          apt:
            name:
              - ca-certificates
              - curl
              - gnupg
            update_cache: yes
            state: present
          delegate_to: "{{ inventory_hostname }}"
    
        - name: Ensure /etc/apt/keyrings exists
          file:
            path: /etc/apt/keyrings
            state: directory
            mode: '0755'
          delegate_to: "{{ inventory_hostname }}"
    
        - name: Get system architecture for Docker repo
          ansible.builtin.command: dpkg --print-architecture
          register: dpkg_architecture
          changed_when: false
          delegate_to: "{{ inventory_hostname }}"
    
        - name: Setup deb822 formatted repositorie
          ansible.builtin.deb822_repository:
            name: php
            types: deb
            uris: https://download.docker.com/linux/debian
            components: stable
            suites: "{{ ansible_distribution_release }}"
            signed_by: https://download.docker.com/linux/debian/gpg
            state: present
            enabled: true
          when: (ansible_distribution == 'Debian' and ansible_distribution_major_version >= '13')
    
        - name: Download Docker GPG key
          ansible.builtin.get_url:
            url: https://download.docker.com/linux/debian/gpg
            dest: /etc/apt/keyrings/docker.asc
            mode: '0644'
          delegate_to: "{{ inventory_hostname }}"
    
        - name: DEBUG - Check if GPG key exists
          ansible.builtin.stat:
            path: /etc/apt/keyrings/docker.asc
          register: gpg_key_stat
          delegate_to: "{{ inventory_hostname }}"
    
        - name: DEBUG - Show GPG key status
          ansible.builtin.debug:
            msg: "GPG key exists: {{ gpg_key_stat.stat.exists }}, Size: {{ gpg_key_stat.stat.size | default('N/A') }}"
    
        - name: DEBUG - List keyrings directory
          ansible.builtin.command: ls -lah /etc/apt/keyrings/
          register: keyrings_list
          delegate_to: "{{ inventory_hostname }}"
    
        - name: DEBUG - Show keyrings directory contents
          ansible.builtin.debug:
            var: keyrings_list.stdout_lines
    
        - name: Add Docker APT repository (correct for Debian 13)
          ansible.builtin.apt_repository:
            repo: "deb [arch={{ dpkg_architecture.stdout }} signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable"
            filename: docker
            state: present
          delegate_to: "{{ inventory_hostname }}"
    
        - name: DEBUG - Check if repo file exists
          ansible.builtin.stat:
            path: /etc/apt/sources.list.d/docker.list
          register: repo_file_stat
          delegate_to: "{{ inventory_hostname }}"
    
        - name: DEBUG - Show repo file status
          ansible.builtin.debug:
            msg: "Repo file exists: {{ repo_file_stat.stat.exists }}"
    
        - name: DEBUG - Show repo file contents if exists
          ansible.builtin.command: cat /etc/apt/sources.list.d/docker.list
          register: repo_contents
          when: repo_file_stat.stat.exists
          failed_when: false
          delegate_to: "{{ inventory_hostname }}"
    
        - name: DEBUG - Display repo contents
          ansible.builtin.debug:
            var: repo_contents.stdout_lines
          when: repo_file_stat.stat.exists
    
        - name: Update apt cache after adding repo
          apt:
            update_cache: yes
          delegate_to: "{{ inventory_hostname }}"
    
        - name: Install Docker packages
          apt:
            name: "{{ docker_packages }}"
            state: present
          delegate_to: "{{ inventory_hostname }}"
    
        - name: Enable & start Docker
          service:
            name: docker
            state: started
            enabled: yes
          delegate_to: "{{ inventory_hostname }}"
    
    
      

     
        
    PLAY [Install Docker Engine and Docker Compose on Debian (Ansible WebUI compatible)] ***
    
    TASK [Gathering Facts] *********************************************************
    [WARNING]: Host 'anytype.lab' is using the discovered Python interpreter at '/usr/bin/python3.13', but future installation of another Python interpreter could cause a different interpreter to be discovered. See https://docs.ansible.com/ansible-core/2.19/reference_appendices/interpreter_discovery.html for more information.
    ok: [anytype.lab]
    
    TASK [Ensure required packages are installed] **********************************
    changed: [anytype.lab]
    
    TASK [Ensure /etc/apt/keyrings exists] *****************************************
    ok: [anytype.lab]
    
    TASK [Get system architecture for Docker repo] *********************************
    skipping: [anytype.lab]
    
    TASK [Setup deb822 formatted repositorie] **************************************
    changed: [anytype.lab]
    
    TASK [Download Docker GPG key] *************************************************
    changed: [anytype.lab]
    
    TASK [DEBUG - Check if GPG key exists] *****************************************
    ok: [anytype.lab]
    
    TASK [DEBUG - Show GPG key status] *********************************************
    ok: [anytype.lab] => {
        "msg": "GPG key exists: False, Size: N/A"
    }
    
    TASK [DEBUG - List keyrings directory] *****************************************
    skipping: [anytype.lab]
    
    TASK [DEBUG - Show keyrings directory contents] ********************************
    ok: [anytype.lab] => {
        "keyrings_list.stdout_lines": []
    }
    
    TASK [Add Docker APT repository (correct for Debian 13)] ***********************
    changed: [anytype.lab]
    
    TASK [DEBUG - Check if repo file exists] ***************************************
    ok: [anytype.lab]
    
    TASK [DEBUG - Show repo file status] *******************************************
    ok: [anytype.lab] => {
        "msg": "Repo file exists: False"
    }
    
    TASK [DEBUG - Show repo file contents if exists] *******************************
    skipping: [anytype.lab]
    
    TASK [DEBUG - Display repo contents] *******************************************
    skipping: [anytype.lab]
    
    TASK [Update apt cache after adding repo] **************************************
    changed: [anytype.lab]
    
    TASK [Install Docker packages] *************************************************
    [ERROR]: Task failed: Module failed: No package matching 'docker-ce' is available
    Origin: /tmp/ansible-webui/repositories/1_ansibleplaybooksrepo/playbooks/debian13docker.yml:112:7
    
    110       delegate_to: "{{ inventory_hostname }}"
    111
    112     - name: Install Docker packages
              ^ column 7
    
    fatal: [anytype.lab]: FAILED! => {"changed": false, "msg": "No package matching 'docker-ce' is available"}
    
    PLAY RECAP *********************************************************************
    anytype.lab                : ok=12   changed=5    unreachable=0    failed=1    skipped=4    rescued=0    ignored=0   
    
    
    
      
  • none that i can see

  • oh! I wasnt aware of that? i see its slightly outdated, it has version 26 as opposed to 29 from its official source. at least in trixie stable

  • WOW. I HAVE NOT THOUGHT OF THAT!!!111

  • Selfhosted @lemmy.world

    Docker setup for debian 13 trixie Ansible Playbook

  • Gaming @lemmy.ml

    More Destiny 1 Xbox gameplay

    feditubo.yt /w/v4f33ihR3pZUq2dW1Rvvef
  • Gaming @lemmy.ml

    Destiny 1 Xbox gameplay

    feditubo.yt /w/43cTPqtsCS6N7SBz9eea3u
  • Gaming @lemmy.ml

    feditubo.yt /w/4VZEgormkZ9xQULKKGtkYe
  • hey! How do you move your videos stream from owncast to peertube? do you record at the same time you stream, recompile the hls to mp4 manually and upload afterwards, or is there some plugins to automate all of that?

  • Spain (España)'s community in Lemmy @lemmy.ml

    Instancia libre en español de pixelfed

    luzeed.org
  • A bit of both.

  • Thunderbird on desktop / laptop. Proton + Gmail app on android

  • Thunderbird on desktops / laptops. Gmail + proton mail app on android

  • Technology @lemmy.ml

    Running windows on GPU memory

    www.extremetech.com /computing/developer-creates-compact-windows-11-that-runs-in-gpu-vram
  • hahaha niiice that is quite a workspace!

  • Self Hosted - Self-hosting your services. @lemmy.ml

    Awesome-Selfhosted - curated list of software for selfhosting services

    github.com /awesome-selfhosted/awesome-selfhosted/blob/master/README.md
  • Good to see this place. Hope to see it grow.

  • This nickname is just my name and last name initial.