docker-formula/docker/init.sls
2024-10-20 16:01:03 +02:00

27 lines
672 B
Text

{% 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
- enable: True