mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Refactored native-
This commit is contained in:
19
roles/docker/Readme.md
Normal file
19
roles/docker/Readme.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# role docker
|
||||
|
||||
## maintanance
|
||||
|
||||
### list unused volumes
|
||||
```bash
|
||||
docker volume ls -q -f "dangling=true"
|
||||
```
|
||||
|
||||
### remove all unused volumes
|
||||
```bash
|
||||
docker volume rm $(docker volume ls -q -f "dangling=true")
|
||||
```
|
||||
|
||||
## performance
|
||||
- https://forums.docker.com/t/mysql-slow-performance-in-docker/37179/21
|
||||
|
||||
## see
|
||||
- https://stackoverflow.com/questions/37599128/docker-how-do-you-disable-auto-restart-on-a-container
|
3
roles/docker/handlers/main.yml
Normal file
3
roles/docker/handlers/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
- name: docker restart
|
||||
service: name=docker.service state=restarted enabled=yes
|
5
roles/docker/meta/main.yml
Normal file
5
roles/docker/meta/main.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
dependencies:
|
||||
- docker-volume-backup
|
||||
- user-administrator
|
||||
- docker-health-check
|
||||
- docker-compose-restart-unhealthy
|
25
roles/docker/tasks/main.yml
Normal file
25
roles/docker/tasks/main.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
- name: docker & docker compose install
|
||||
pacman:
|
||||
name: ['docker','docker-compose']
|
||||
state: present
|
||||
notify: docker restart
|
||||
|
||||
- name: "create {{path_docker_compose_files}}"
|
||||
file:
|
||||
path: "{{path_docker_compose_files}}"
|
||||
state: directory
|
||||
mode: 0700
|
||||
owner: administrator
|
||||
group: administrator
|
||||
|
||||
- name: "create {{path_docker_volumes}}"
|
||||
file:
|
||||
path: "{{path_docker_volumes}}"
|
||||
state: directory
|
||||
mode: 0700
|
||||
owner: administrator
|
||||
group: administrator
|
||||
|
||||
- name: flush docker service
|
||||
meta: flush_handlers
|
Reference in New Issue
Block a user