mirror of
https://gitea.0xace.cc/ansible-galaxy/podman.git
synced 2024-11-24 23:06:39 +00:00
add more flexible versioning logic
This commit is contained in:
parent
255166ae26
commit
3caa5a2049
@ -1,2 +1,2 @@
|
||||
---
|
||||
podman_version: "{{ '1.6.4' if ansible_facts['distribution_major_version'] == '7' else '4.4.1' if ansible_facts['distribution_major_version'] == '8' else '4.4.1' if ansible_facts['distribution_major_version'] == '9' }}"
|
||||
podman_version: ""
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: Ensure podman version {{ podman_version }} installed
|
||||
- name: Ensure {{ podman_package }} installed
|
||||
yum:
|
||||
name: "podman-{{ podman_version }}"
|
||||
state: present
|
||||
name: "{{ podman_package }}"
|
||||
state: "{{ 'latest' if podman_version == 'latest' else 'present' }}"
|
||||
|
@ -1,3 +1,13 @@
|
||||
---
|
||||
- name: Load a variable file based on the OS type
|
||||
include_vars: "{{ lookup('first_found', params) }}"
|
||||
vars:
|
||||
params:
|
||||
files:
|
||||
- "{{ ansible_facts['distribution'] }}.yaml"
|
||||
- "{{ ansible_facts['os_family'] }}.yaml"
|
||||
paths:
|
||||
- "vars"
|
||||
|
||||
- name: Include podman install
|
||||
include_tasks: "{{ ansible_facts['os_family'] }}.yaml"
|
||||
|
2
vars/RedHat.yaml
Normal file
2
vars/RedHat.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
podman_package_name: podman
|
||||
podman_package: "{{ podman_package_name + '-' + podman_version if (podman_version is defined and (podman_version != '*' and podman_version != '' and podman_version != 'latest')) else podman_package_name }}"
|
Loading…
Reference in New Issue
Block a user