First commit

This commit is contained in:
Adrien Reslinger 2024-07-13 12:14:03 +02:00
commit b840da79b8
Signed by: adrien
GPG key ID: DA7B27055C66D6DE
7 changed files with 75 additions and 0 deletions

5
README.md Normal file
View file

@ -0,0 +1,5 @@
[![Build Status](https://drone.reslinger.net/api/badges/adrien/ansible-role-podman/status.svg)](https://drone.reslinger.net/adrien/ansible-role-podman)
# ansible-role-podman
Ansible role to install and configure Podman

1
defaults/main.yml Normal file
View file

@ -0,0 +1 @@
---

5
handlers/main.yml Normal file
View file

@ -0,0 +1,5 @@
---
- name: Restart podman
ansible.builtin.service:
name: "{{ podman_service }}"
state: restarted

18
meta/main.yml Normal file
View file

@ -0,0 +1,18 @@
galaxy_info:
author: Adrien Reslinger
description: Install podman
company: Personnal
min_ansible_version: 2.9
galaxy_tags: []
license: GPL2
platforms:
- name: CentOS
version:
- 7
- 8
- 9
- name: RedHat
version:
- 7
- 8
- 9

17
tasks/RedHat.yml Normal file
View file

@ -0,0 +1,17 @@
---
- name: Enable AppStream RHSM repository
community.general.rhsm_repository:
name: "rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-appstream-rpms"
when:
- ansible_distribution == "RedHat"
- ansible_distribution_major_version >= '8'
#- name: Install Podman
# ansible.builtin.package:
# name:
# - podman
# - podman-docker
# state: present
# update_cache: yes
## when:
## - (ansible_distribution == "OracleLinux") or (ansible_distribution == "CentOS")

23
tasks/main.yml Normal file
View file

@ -0,0 +1,23 @@
---
- name: Include vars for {{ ansible_os_family }}
include_vars: "{{ ansible_os_family }}.yml"
- name: Include tasks for {{ ansible_os_family }}
include_tasks: "{{ ansible_os_family }}.yml"
- name: Install Podman packages
package:
name: "{{ podman_packages }}"
state: present
update_cache: yes
# when:
# ansible_os_family != "RedHat"
notify: Restart podman
- name: Enable podman
service:
name: "{{ podman_service }}"
state: started
enabled: yes
# sudo touch /etc/containers/nodocker

6
vars/RedHat.yml Normal file
View file

@ -0,0 +1,6 @@
---
openvswitch_service: podman
podman_packages:
- podman
- podman-docker