adding additional variables

pull/1/head
Cian Hatton 3 years ago
parent 26b96ecd29
commit c42c3cbd45

@ -30,4 +30,4 @@
- name: Start Portainer
tags: "skip-e2e" # we can't mount volumes on test runners.
command: chdir=/home/cianhatton/checkouts/HomeLab/docker-compose/portainer docker compose up -d
command: "chdir={{home_lab_checkout_dir}}/docker-compose/portainer docker compose up -d"

@ -2,12 +2,12 @@
- name: Git checkout HomeLab repository
ansible.builtin.git:
repo: 'https://github.com/chatton/HomeLab.git'
dest: "/home/{{homelab_user}}/checkouts/HomeLab"
dest: "{{home_lab_checkout_dir}}"
force: true
version: master
- name: Change Ownership
file:
path: "/home/{{homelab_user}}/checkouts/HomeLab"
path: "{{home_lab_checkout_dir}}"
owner: "{{homelab_user}}"
group: "{{homelab_group}}"

@ -8,10 +8,10 @@
- name: Find volumes
ansible.builtin.shell: docker run --rm
-v /var/run/docker.sock:/var/run/docker.sock
-v /mnt/hdds/backups/:/mnt/hdds/backups/
ghcr.io/chatton/docker-volume-backup:master
-v "{{backup_dir}}:{{backup_dir}}"
"{{docker_volume_backup_image}}"
list-backups
--host-path /mnt/hdds/backups/
--host-path "{{backup_dir}}"
--volume-name-filter {{container_name}}
--newest-only
register: out
@ -25,7 +25,7 @@
- name: Restore Volume
ansible.builtin.command: docker run --rm
-v /var/run/docker.sock:/var/run/docker.sock
ghcr.io/chatton/docker-volume-backup:master
{{docker_volume_backup_image}}
restore-volume
--volume {{item.volumeName}}
--archive {{item.absoluteFilePath}}

@ -2,3 +2,5 @@
homelab_user: cianhatton
homelab_group: cianhatton
backup_dir: /mnt/hdds/backups/
docker_volume_backup_image: ghcr.io/chatton/docker-volume-backup:master
home_lab_checkout_dir: /home/cianhatton/checkouts/HomeLab

Loading…
Cancel
Save