# SPDX-License-Identifier: MIT
---
# Put the role's internal variables here that are not distribution specific.
# You can override these by defining the same variable with a different
# value in a platform/version specific file in vars/
__podman_packages:
  - podman

# Default values to use when creating host directories for bind mounts
# User can override these in podman_host_directories
__podman_hostdirs_defaults:
  state: directory

# defaults applied when adding ports
__podman_ports_defaults:
  state: enabled

# prefix to use for systemd service file names
__podman_systemd_prefix: lsr_container

# path for root containers - systemd unit files
__podman_systemd_root_path: "/etc/systemd/system"

# relative path for non-root containers - under home dir
__podman_systemd_non_root_path: "/.config/systemd/user"

# ansible_facts required by the role
__podman_required_facts:
  - distribution
  - distribution_major_version
  - distribution_version
  - os_family

# the subsets of ansible_facts that need to be gathered in case any of the
# facts in required_facts is missing; see the documentation of
# the 'gather_subset' parameter of the 'setup' module
__podman_required_facts_subsets: "{{ ['!all', '!min'] + __podman_required_facts }}"

# location for system containers directory
__podman_etc_containers_path: "/etc/containers"

# location for user containers directory
# relative to $HOME
__podman_user_containers_path: ".config/containers"

# mode for __podman_etc_containers_path
__podman_etc_containers_mode: "0755"

# mode for user __podman_user_containers_path
__podman_user_containers_mode: "0700"

__podman_containers_conf_file_name: 50-systemroles.conf
__podman_containers_conf_system: >-
  {{ __podman_etc_containers_path }}/containers.conf.d/{{ __podman_containers_conf_file_name }}
# relative to $HOME
__podman_containers_conf_user: >-
  {{ __podman_user_containers_path }}/containers.conf.d/{{ __podman_containers_conf_file_name }}

__podman_registries_conf_file_name: 50-systemroles.conf
__podman_registries_conf_system: >-
  {{ __podman_etc_containers_path }}/registries.conf.d/{{ __podman_registries_conf_file_name }}
# relative to $HOME
__podman_registries_conf_user: >-
  {{ __podman_user_containers_path }}/registries.conf.d/{{ __podman_registries_conf_file_name }}

__podman_storage_conf_file_name: storage.conf
__podman_storage_conf_system: >-
  {{ __podman_etc_containers_path }}/{{ __podman_storage_conf_file_name }}
# relative to $HOME
__podman_storage_conf_user: >-
  {{ __podman_user_containers_path }}/{{ __podman_storage_conf_file_name }}

__podman_policy_json_file_name: policy.json
__podman_policy_json_system: >-
  /etc/containers/{{ __podman_policy_json_file_name }}
# relative to $HOME
__podman_policy_json_user: >-
  {{ __podman_user_containers_path }}/{{ __podman_policy_json_file_name }}

# location for system kubernetes yaml files
__podman_system_kube_path: "{{ __podman_etc_containers_path }}/ansible-kubernetes.d"

# location for user kubernetes yaml files
__podman_user_kube_path: "/{{ __podman_user_containers_path }}/ansible-kubernetes.d"

# location for system quadlet files
__podman_system_quadlet_path: "{{ __podman_etc_containers_path }}/systemd"

# location for user quadlet files
__podman_user_quadlet_path: "/{{ __podman_user_containers_path }}/systemd"

# location for user certs_d
__podman_user_certs_d_path: "/{{ __podman_user_containers_path }}/certs.d"

# location for system certs_d
__podman_system_certs_d_path: "{{ __podman_etc_containers_path }}/certs.d"

# BEGIN - DO NOT EDIT THIS BLOCK - rh distros variables
# Ansible distribution identifiers that the role treats like RHEL
__podman_rh_distros:
  - AlmaLinux
  - CentOS
  - RedHat
  - Rocky

# Same as above but includes Fedora
__podman_rh_distros_fedora: "{{ __podman_rh_distros + ['Fedora'] }}"

# Use this in conditionals to check if distro is Red Hat or clone
__podman_is_rh_distro: "{{ ansible_distribution in __podman_rh_distros }}"

# Use this in conditionals to check if distro is Red Hat or clone, or Fedora
__podman_is_rh_distro_fedora: "{{ ansible_distribution in __podman_rh_distros_fedora }}"
# END - DO NOT EDIT THIS BLOCK - rh distros variables
