2024-06-22 11:42:10 +02:00
|
|
|
{% set package_names = salt['grains.filter_by']({
|
|
|
|
'Debian':
|
|
|
|
{'docker': 'docker.io', 'python_docker': 'python3-docker'},
|
|
|
|
'Suse':
|
|
|
|
{'docker': 'docker', 'python_docker': 'python311-docker'},
|
|
|
|
'RedHat':
|
|
|
|
{'docker': 'docker', 'python_docker': 'python3-docker'}
|
|
|
|
}, default='Debian') %}
|
|
|
|
|
|
|
|
docker installed:
|
|
|
|
pkg.installed:
|
|
|
|
- name: {{ package_names.docker }}
|
|
|
|
|
|
|
|
python docker installed:
|
|
|
|
pkg.installed:
|
|
|
|
- name: {{ package_names.python_docker }}
|
|
|
|
|
|
|
|
{% if grains.os_family in ["Suse", "Debian"] %}
|
|
|
|
apparmor-utils installed:
|
|
|
|
pkg.installed:
|
|
|
|
- name: apparmor-utils
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
docker service running:
|
|
|
|
service.running:
|
|
|
|
- name: docker
|
2024-10-20 16:01:03 +02:00
|
|
|
- enable: True
|