This commit is contained in:
@@ -1,9 +1,7 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Install and configure Docker
|
- name: Install and configure Docker
|
||||||
hosts:
|
hosts: ci_servers
|
||||||
- ci_servers
|
|
||||||
- ci_runners
|
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
|
|||||||
@@ -0,0 +1,59 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: Install and configure Podman
|
||||||
|
hosts: ci_runners
|
||||||
|
become: true
|
||||||
|
|
||||||
|
vars:
|
||||||
|
# Packages common to both Debian and RHEL families
|
||||||
|
podman_base_packages:
|
||||||
|
- podman
|
||||||
|
- podman-docker
|
||||||
|
|
||||||
|
# Debian/Ubuntu specific packages
|
||||||
|
podman_debian_packages:
|
||||||
|
- podman-compose
|
||||||
|
|
||||||
|
# RHEL-family specific packages (adjust or add epel-release if compose is needed)
|
||||||
|
podman_rhel_packages: []
|
||||||
|
|
||||||
|
# Set to true if you need the Docker-compatible API socket (e.g., for Woodpecker CI)
|
||||||
|
podman_enable_socket: true
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Gather distribution-specific facts
|
||||||
|
ansible.builtin.setup:
|
||||||
|
gather_subset:
|
||||||
|
- "!all"
|
||||||
|
- distribution
|
||||||
|
- os_family
|
||||||
|
|
||||||
|
- name: Install Podman packages on Debian/Ubuntu
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: "{{ podman_base_packages + podman_debian_packages }}"
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
cache_valid_time: 3600
|
||||||
|
when: ansible_facts['os_family'] == 'Debian'
|
||||||
|
|
||||||
|
- name: Install Podman packages on RHEL/Rocky/AlmaLinux/CentOS
|
||||||
|
ansible.builtin.dnf:
|
||||||
|
name: "{{ podman_base_packages + podman_rhel_packages }}"
|
||||||
|
state: present
|
||||||
|
when: ansible_facts['os_family'] == 'RedHat'
|
||||||
|
|
||||||
|
- name: Enable and start system-wide Podman socket
|
||||||
|
ansible.builtin.systemd:
|
||||||
|
name: podman.socket
|
||||||
|
state: started
|
||||||
|
enabled: true
|
||||||
|
when: podman_enable_socket
|
||||||
|
|
||||||
|
- name: Verify Podman installation
|
||||||
|
ansible.builtin.command: podman --version
|
||||||
|
register: podman_version_output
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: Show installed Podman version
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "Installed {{ podman_version_output.stdout }}"
|
||||||
@@ -12,6 +12,8 @@
|
|||||||
import_playbook: munin.yml
|
import_playbook: munin.yml
|
||||||
- name: Gitea
|
- name: Gitea
|
||||||
import_playbook: gitea.yml
|
import_playbook: gitea.yml
|
||||||
|
- name: Podman
|
||||||
|
import_playbook: podman.yml
|
||||||
- name: Docker
|
- name: Docker
|
||||||
import_playbook: docker.yml
|
import_playbook: docker.yml
|
||||||
- name: Apache
|
- name: Apache
|
||||||
|
|||||||
Reference in New Issue
Block a user