feat: initial commit
This commit is contained in:
parent
1ef29fee42
commit
03e9a026a1
15 changed files with 234 additions and 93 deletions
14
tasks/cleanup.yaml
Normal file
14
tasks/cleanup.yaml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
|
||||
# cleanup
|
||||
- name: "docker - prune all"
|
||||
community.docker.docker_prune:
|
||||
containers: true
|
||||
images: true
|
||||
networks: true
|
||||
volumes: true
|
||||
builder_cache: true
|
||||
|
||||
- name: "docker - force prune"
|
||||
ansible.builtin.command: "docker system prune --all --force --volumes"
|
||||
changed_when: false
|
||||
9
tasks/main.yaml
Normal file
9
tasks/main.yaml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
|
||||
# install pulse
|
||||
- name: "install pulse"
|
||||
ansible.builtin.import_tasks: "pulse.yaml"
|
||||
|
||||
# cleanup docker
|
||||
- name: "cleanup docker"
|
||||
ansible.builtin.import_tasks: "cleanup.yaml"
|
||||
48
tasks/pulse.yaml
Normal file
48
tasks/pulse.yaml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
|
||||
# create pulse data directory
|
||||
- name: "create pulse data directory"
|
||||
ansible.builtin.file:
|
||||
path: "/mnt/pulse/data"
|
||||
state: "directory"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0775"
|
||||
|
||||
|
||||
# docker pull pulse
|
||||
- name: "run pulse"
|
||||
community.docker.docker_container:
|
||||
|
||||
# container_default_behavior
|
||||
auto_remove: "no"
|
||||
container_default_behavior: "no_defaults"
|
||||
detach: "yes"
|
||||
init: "no"
|
||||
interactive: "no"
|
||||
log_driver: "json-file"
|
||||
log_options:
|
||||
max-size: "5m"
|
||||
max-file: "3"
|
||||
memory: "0"
|
||||
paused: "no"
|
||||
privileged: "no"
|
||||
pull: "always"
|
||||
read_only: "no"
|
||||
state: "started"
|
||||
tty: "no"
|
||||
|
||||
# pulse
|
||||
name: "pulse"
|
||||
image: "docker.io/rcourtman/pulse:4.25.0"
|
||||
image_name_mismatch: "recreate"
|
||||
network_mode: "host"
|
||||
restart_policy: "unless-stopped"
|
||||
|
||||
volumes:
|
||||
- "/mnt/pulse/data:/data"
|
||||
|
||||
env:
|
||||
|
||||
# global
|
||||
TZ: "{{ timezone }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue