feat: Revert playbook to focus on network role for Scully and add podman role

This commit is contained in:
Tobias J. Endres 2025-09-02 18:06:19 +02:00
parent 3021a122f7
commit b227385ae5
3 changed files with 29 additions and 10 deletions

View File

@ -3,4 +3,4 @@
become: true
roles:
- common
- network
- network

View File

@ -17,21 +17,30 @@
- curl
state: present
- name: Download Docker repository key securely
become: true
get_url:
url: https://download.docker.com/linux/ubuntu/gpg
dest: /etc/apt/keyrings/docker.asc
mode: '0644'
force: true # Ensures updates if the key changes
- name: Add Docker's official GPG key
shell: |
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
args:
creates: /etc/apt/keyrings/docker.gpg
- name: Add Docker repository
become: true
apt_repository:
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
state: present
update_cache: true
- name: Read docker sources list
slurp:
src: /etc/apt/sources.list.d/download_docker_com_linux_ubuntu.list
register: docker_sources_list
- name: Display docker sources list
debug:
var: docker_sources_list.content | b64decode
- name: Install Docker and related components
become: true
apt:
@ -54,4 +63,4 @@
service:
name: docker
state: started
enabled: true
enabled: true

View File

@ -0,0 +1,10 @@
---
- name: Install Podman
ansible.builtin.apt:
name: podman
state: present
- name: Install podman-docker (optional, for docker command alias)
ansible.builtin.apt:
name: podman-docker
state: present