init
This commit is contained in:
commit
b806dba119
2 changed files with 29 additions and 0 deletions
3
README.md
Normal file
3
README.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Docker formula
|
||||||
|
|
||||||
|
A salt formula for installing docker.
|
26
docker/init.sls
Normal file
26
docker/init.sls
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{% 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
|
Loading…
Reference in a new issue