Add action for purging docker
Proposal
Problem that sometimes occur on instances is lack of free space because docker images (in many versions that are not used anymore), volumes etc. may occupied memory. We should add docker prune action.
Code example
- name: "prune Docker files"
command: "docker system prune --all --volumes --force"
register: "_result_provisioning_docker_prune"
changed_when: >-
_result_provisioning_docker_prune.stdout_lines[-1]
| regex_replace('^Total reclaimed space: (\\d+(\\.\\d+)?)[kMGT]?B$', '\\1')
| float
!= 0.0