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 - python3-cryptography
pip_pkgs: pip_pkgs:
- docker==5.0.3 - docker==5.0.3
- docker-compose - docker-compose==1.29.2
daemon: daemon:
config: config:
storage-driver: overlay2 storage-driver: overlay2

View File

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

View File

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

View File

@ -1,6 +1,5 @@
{%- import_yaml "docker/defaults.yaml" as default_settings -%} {%- 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