adding additional variables

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

@ -30,4 +30,4 @@
- name: Start Portainer - name: Start Portainer
tags: "skip-e2e" # we can't mount volumes on test runners. 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 - name: Git checkout HomeLab repository
ansible.builtin.git: ansible.builtin.git:
repo: 'https://github.com/chatton/HomeLab.git' repo: 'https://github.com/chatton/HomeLab.git'
dest: "/home/{{homelab_user}}/checkouts/HomeLab" dest: "{{home_lab_checkout_dir}}"
force: true force: true
version: master version: master
- name: Change Ownership - name: Change Ownership
file: file:
path: "/home/{{homelab_user}}/checkouts/HomeLab" path: "{{home_lab_checkout_dir}}"
owner: "{{homelab_user}}" owner: "{{homelab_user}}"
group: "{{homelab_group}}" group: "{{homelab_group}}"

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

@ -1,4 +1,6 @@
--- ---
homelab_user: cianhatton homelab_user: cianhatton
homelab_group: cianhatton homelab_group: cianhatton
backup_dir: /mnt/hdds/backups/ 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