Fix install docker for trixie
This commit is contained in:
parent
2355aa6e12
commit
1e7e6b612d
@ -11,22 +11,32 @@
|
|||||||
- apt-transport-https
|
- apt-transport-https
|
||||||
- ca-certificates
|
- ca-certificates
|
||||||
- curl
|
- curl
|
||||||
- software-properties-common
|
- gnupg
|
||||||
|
- lsb-release
|
||||||
- python3-pip
|
- python3-pip
|
||||||
- virtualenv
|
- virtualenv
|
||||||
- python3-setuptools
|
- python3-setuptools
|
||||||
state: latest
|
state: latest
|
||||||
update_cache: true
|
update_cache: true
|
||||||
|
|
||||||
- name: Add Docker GPG apt Key
|
- name: Download Docker GPG key
|
||||||
ansible.builtin.apt_key:
|
ansible.builtin.get_url:
|
||||||
url: https://download.docker.com/linux/debian/gpg
|
url: https://download.docker.com/linux/debian/gpg
|
||||||
state: present
|
dest: /etc/apt/keyrings/docker.gpg
|
||||||
|
mode: '0644'
|
||||||
|
|
||||||
|
- name: Add Docker GPG key to apt keyring
|
||||||
|
ansible.builtin.shell: |
|
||||||
|
gpg --dearmor < /etc/apt/keyrings/docker.gpg > /etc/apt/keyrings/docker.gpg.gpg
|
||||||
|
chmod 644 /etc/apt/keyrings/docker.gpg.gpg
|
||||||
|
args:
|
||||||
|
creates: /etc/apt/keyrings/docker.gpg.gpg
|
||||||
|
|
||||||
- name: Add Docker Repository
|
- name: Add Docker Repository
|
||||||
ansible.builtin.apt_repository:
|
ansible.builtin.apt_repository:
|
||||||
repo: deb https://download.docker.com/linux/debian bookworm stable
|
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg.gpg] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable"
|
||||||
state: present
|
state: present
|
||||||
|
filename: docker
|
||||||
|
|
||||||
- name: Update apt and install docker-ce
|
- name: Update apt and install docker-ce
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
@ -34,12 +44,6 @@
|
|||||||
state: latest
|
state: latest
|
||||||
update_cache: true
|
update_cache: true
|
||||||
|
|
||||||
- name: Update apt and install docker-compose
|
|
||||||
ansible.builtin.apt:
|
|
||||||
name: docker-compose
|
|
||||||
state: latest
|
|
||||||
update_cache: true
|
|
||||||
|
|
||||||
- name: Install Docker Module for Python
|
- name: Install Docker Module for Python
|
||||||
ansible.builtin.pip:
|
ansible.builtin.pip:
|
||||||
name: docker
|
name: docker
|
||||||
@ -50,3 +54,15 @@
|
|||||||
name: '{{ ansible_user }}'
|
name: '{{ ansible_user }}'
|
||||||
groups: docker
|
groups: docker
|
||||||
append: true
|
append: true
|
||||||
|
|
||||||
|
- name: Ensure Docker service is started and enabled
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: docker
|
||||||
|
state: started
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
- name: Ensure Docker Compose plugin is installed
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: docker-compose-plugin
|
||||||
|
state: latest
|
||||||
|
update_cache: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user