updated docker state

This commit is contained in:
Paul 2023-02-04 19:54:02 +01:00
parent 8c4e177980
commit 2c301c8e9e
5 changed files with 13 additions and 8 deletions

View File

@ -9,7 +9,7 @@ docker:
- python3-cryptography
pip_pkgs:
- docker==5.0.3
- docker-compose
- docker-compose==1.29.2
daemon:
config:
storage-driver: overlay2

View File

@ -4,4 +4,5 @@ include:
- .install
- .config
- .service
- .containers
- .containers
- .prune

View File

@ -4,8 +4,8 @@ docker-pkgs:
pkg.installed:
- pkgs: {{ docker.pkgs }}
docker-pip-pkgs:
{%- for pkg in docker.pip_pkgs %}
docker-pip-{{ pkg }}:
pip.installed:
{%- for pip in docker.pip_pkgs %}
- name: {{ pip }}
- name: {{ pkg }}
{%- endfor %}

View File

@ -1,6 +1,5 @@
{%- import_yaml "docker/defaults.yaml" as default_settings -%}
{%- set defaults = salt['grains.filter_by'](default_settings, default='docker')
-%}
{%- set defaults = salt['grains.filter_by'](default_settings, default='docker') -%}
{%- set docker = salt['pillar.get']('docker', default=defaults, merge=True) -%}
{%- set docker = salt['pillar.get']('docker', default=defaults, merge=True) -%}

5
states/docker/prune.sls Normal file
View File

@ -0,0 +1,5 @@
---
docker.prune:
module.run:
- docker.prune:
- images: true